escalador Posted May 19, 2008 Share Posted May 19, 2008 I need a little help please Like this it's working $sql = "UPDATE users SET city='$_POST[city]' WHERE username='escalador'"; $result = mysql_query($sql); Like this it's working $sql = 'UPDATE users SET city="L.A." WHERE username="'.$_SESSION["username"].'";'; And now don't work... $sql = "UPDATE users SET city='$_POST[city]' WHERE username="'.$_SESSION["username"].'";"; $result = mysql_query($sql); and gives this error Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\xampp\htdocs\change.php on line 15 What is the problem ? Thank's Link to comment https://forums.phpfreaks.com/topic/106240-update-problem-please-help/ Share on other sites More sharing options...
Symmetry Posted May 19, 2008 Share Posted May 19, 2008 $sql = "UPDATE users SET city='".$_POST[city]."' WHERE username='".$_SESSION["username"]."'"; Link to comment https://forums.phpfreaks.com/topic/106240-update-problem-please-help/#findComment-544518 Share on other sites More sharing options...
escalador Posted May 19, 2008 Author Share Posted May 19, 2008 thank's it's working Link to comment https://forums.phpfreaks.com/topic/106240-update-problem-please-help/#findComment-544522 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.