Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE) [duplicate]

Tags:

php

mysql

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!

like image 251
user1804933 Avatar asked Jul 25 '13 20:07

user1804933


1 Answers

You have extra single quotes :

$introduction="INSERT INTO Introduction (Title, Description)
VALUES ('$_POST[introtitle]','$_POST[introdescription]')";
like image 179
Fabien TheSolution Avatar answered Nov 05 '22 06:11

Fabien TheSolution