-4

I have no idea why am I getting that error at the end of this line

 $sql = "INSERT INTO person (Name,Email,Date,Gender,WardType)
         VALUES ('$Name','$Email','$Date','$Gender','$WardType')");

Suppose the closing was supposed to be such? or '); but they all giving me the error.

aorcsik
  • 15,271
  • 5
  • 39
  • 49

3 Answers3

-1

Try This and used concatenation

//$sql = "INSERT INTO person (Name,Email,Date,Gender,WardType) VALUES
//("'.$Name.'","'.$Email.'","'.$Date.'","'.$Gender.'","'.$WardType.'")";

Use this one now:

 $sql = "INSERT INTO person (Name,Email,Date,Gender,WardType) VALUES 
('".$Name."','".$Email."','".$Date."','".$Gender."','".$WardType."')";

There was a trailing ) at the end.

Ketan Solanki
  • 697
  • 5
  • 13
-1

You have an extra closing parethensis )

Should be like this

$sql = "INSERT INTO person (Name,Email,Date,Gender,WardType) VALUES ('$Name','$Email','$Date','$Gender','$WardType')";
parpar
  • 329
  • 1
  • 10
-1
 $sql = "INSERT INTO person (Name,Email,Date,Gender,WardType) VALUES ('$Name','$Email','$Date','$Gender','$WardType')";

You had a closed parenthesis in the end but it was never opened. Try this one it should work for you. All brackets/parenthesis must open and close if you forget one opened or close one that pairs nowhere you get this error.

pr1nc3
  • 8,108
  • 3
  • 23
  • 36