I get an error with my PHP code when updating the table patient. I cannot find the problem.
Here is my error:
Verification Error: 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 '1' at line 1
<?php
$edit = mysql_query("UPDATE `patient` SET `date`='$date', `fname`='$fname', `lname`='$lname', `birthday`='$dob', `address`='$address', `work`='$work', `civil`='$civil', `gender`='$sex', `btype`='$bloodtype', `height`='$hgt', `weight`='$wgt', `fallergy`='$fallergy', `mallergy`='$mallergy' WHERE `patientid`='$vara'");
$result = mysql_query($edit) or die("Verification Error: " . mysql_error());
patientSETdate='$date',fname='$fname',lname='$lname',birthday='$dob',address='$address',work='$work',civil='$civil',gender='$sex',btype='$bloodtype',height='$hgt',weight='$wgt',fallergy='$fallergy',mallergy='$mallergy' WHEREpatientid='$vara'"); $result = mysql_query($edit) or die("Verification Error: " . mysql_error());