Saturday, 3 February 2018

php - Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE)





Full Error: Parse error: syntax error, unexpected ''

(T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or
variable (T_VARIABLE) or number (T_NUM_STRING)




It says that the error is on line 12. Here is what I have there:



$introduction="INSERT INTO Introduction (Title, Description)
VALUES ('$_POST[introtitle]','$_POST['introdescription']')";



Any help would be greatly appreciated!


Answer



You have extra single quotes :



$introduction="INSERT INTO Introduction (Title, Description)
VALUES ('$_POST[introtitle]','$_POST[introdescription]')";

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...