Saturday, February 3, 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

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...