Jump to content

update problem. please help


escalador

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.