if(empty($errors)){
//Perform Update
$id = mysql_prep($_GET['subj']);
$menu_name = mysql_prep($_POST['menu_name']);
$position = mysql_prep($_POST['position']);
$visible = mysql_prep($_POST['position']);
//the error was started here
$query = "UPDATE subjects SET
menu_name = '{$menu_name}';
position = {$position},
visible = {$visible}
WHERE id = {$id}";
$result = mysql_query($query, $connection);
error message :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'position = 1>, visible = 1> WHERE id = 1' at line 3
thanks

New Topic/Question
Reply




MultiQuote




|