Reputation: 135
Getting this error-
Not sure why, I have looked over it several of times.
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 'WHERE agentclient = 'admin'' at line 1
In this code-
$sql = mysql_query("UPDATE agentclient SET email='$email2', phone='$phone2', Streetaddress='$address2', faxnumber='$faxnumber2', website='$website2', bio='$bio2', WHERE agentclient = '$agentclient2'") or die(mysql_error());
Upvotes: 0
Views: 31
Reputation: 1451
$sql = mysql_query("UPDATE [...] bio='$bio2', WHERE agentclient = '$agentclient2'")[...]
^ this is wrong
Upvotes: 1
Reputation: 1004
The comma before where is wrong, try:
$sql = mysql_query("UPDATE agentclient SET email='$email2', phone='$phone2', Streetaddress='$address2', faxnumber='$faxnumber2', website='$website2', bio='$bio2' WHERE agentclient = '$agentclient2'") or die(mysql_error());
Upvotes: 0