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 'dob=`''1969-12-31'' WHERE userid = 5' at line 1
php code ==
PHP Code:
$sql .= "`dob =`'$dob' WHERE userid = {$_SESSION['userid']}";
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 'dob=`''1969-12-31'' WHERE userid = 5' at line 1
php code ==
PHP Code:
$sql .= "`dob =`'$dob' WHERE userid = {$_SESSION['userid']}";
its worth rep for the first correct solution
$sql .= "SET `dob` = '$dob' WHERE `userid` = {$_SESSION['userid']}";
might be me, but I would have the quote before the = and not after
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 'dob` = ''1969-12-31'' WHERE userid = 5' at line 1
It looks like $dob is a string that's already surrounded by single quotes, so surrounding it again is giving you an error, I would try removing the single quotes around it in your query
PHP Code:
$sql .= "`dob` = $dob WHERE userid = {$_SESSION['userid']}";
Change $result = mysql_query($sql); to $result = mysql_query($sql) or die(mysql_error()); and show us what the actual query looks like, I bet it has something to do with the array you're imploding
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 'dob` = '1969-12-31' WHERE userid = 5' at line 1 UPDATE users set education = 'highschool16', employment = 'unemployed', ms = 'single', children = '0', income = '<10'`dob` = '1969-12-31' WHERE userid = 5