ineedasn
10-20-2008, 05:31 PM
Ok I keep getting an error for this that says my syntax is wrong near "order=7". If I change it to any other column than "order", it works perfectly fine. What could possibly make that happen? This is driving me insane! Heres the code:
<?
session_start();
$uid = $_SESSION['id'];
include("dbcon.php");
$title = $_POST['title'];
$noteid = $_POST['tnum'];
$request = "UPDATE notes SET title='$title' WHERE (user=$uid AND order=$noteid)";
$query = mysql_query($request) or die(mysql_error());
if($query){
echo "Success";
}else{
echo "FFAILURE!!! - ".$request;
}
?>
I cant figure this out...
<?
session_start();
$uid = $_SESSION['id'];
include("dbcon.php");
$title = $_POST['title'];
$noteid = $_POST['tnum'];
$request = "UPDATE notes SET title='$title' WHERE (user=$uid AND order=$noteid)";
$query = mysql_query($request) or die(mysql_error());
if($query){
echo "Success";
}else{
echo "FFAILURE!!! - ".$request;
}
?>
I cant figure this out...