ritch
ritch

Reputation: 1808

PHP/MYSQL Help - unexpected T_VARIABLE

I am trying to make a edit profile page and i want the user to be able to change there username and email address. I've been going at this problem now for sometime and need your help.

Parse error: syntax error, unexpected T_VARIABLE

$edit = mysql_query("UPDATE users (Username, EmailAddress) VALUES('".$newusername."', '".$newemail."') WHERE UserID="$_SESSION['UserID']"");

Upvotes: 0

Views: 1600

Answers (1)

Marek Karbarz
Marek Karbarz

Reputation: 29304

you're missing some dots around $_SESSION['UserID']

$edit = mysql_query("UPDATE users (Username, EmailAddress) VALUES('".$newusername."', '".$newemail."') WHERE UserID=" . $_SESSION['UserID']);

Upvotes: 4

Related Questions