mysql - Error in SQL Syntax? Have to Check Manual...right syntax to use near 'WHERE id=''' at line 11 -


i've been trying make settings page users of website. when open mysettings.php page, page retrieves info db. when click save, error:

you have error in sql syntax; check manual corresponds mysql server version right syntax use near 'where id=''' @ line 11

i have made sure data values correct corresponding database field names. unaware why happening.

my code is:

mysql_query("update nb_user set         `first_name` = '$data[first_name]',         `last_name` = '$data[last_name]',         `country` = '$data[country]',         `lang` = '$data[lang]',         `tel` = '$data[tel]',         `level` = '$data[level]',         `p_desc` = '$data[p_desc]',         `p_post` = '$data[p_post]',         `p_progress` = '$data[p_progress]',          id='$_session[user_id]'         ") or die(mysql_error());  //header("location: mysettings.php?msg=profile sucessfully saved"); $msg[] = "profile sucessfully saved"; } 

does know why happening? logged on whilst happens, , user_id 1.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -