Php Syntax Error Unexpected T_encapsed_and_whitespace
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings parse error syntax error unexpected t_encapsed_and_whitespace expecting and policies of this site About Us Learn more about Stack Overflow
T_encapsed_and_whitespace Wordpress
the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags unexpected t_constant_encapsed_string Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only
Syntax Error, Unexpected T_variable
takes a minute: Sign up Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE) [duplicate] up vote 3 down vote favorite 1 This question already has an answer here: Reference - What does this error mean in PHP? 29 answers 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 unexpected t_string 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! php mysql share|improve this question edited Jul 25 '13 at 20:49 Erman Belegu 2,7471431 asked Jul 25 '13 at 20:44 user1804933 1041210 marked as duplicate by Michael Berkowski, bwoebi, Gordon Jul 25 '13 at 20:48 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. 1 See stackoverflow.com/questions/12769982/… It's the quotes in $_POST['introdescription'] –Michael Berkowski Jul 25 '13 at 20:45 1 Not onto the more serious issue - this is highly vulnerable to SQL injection. You ought to be using parameterized queries via PDO or MySQLi. Read over this question and its answers. –Michael Berkowski Jul 25 '13 at 20:45 You need to read up on SQL injection bugs and how to properly escape data before you write any more SQL code. –tadman Jul 25 '13 at 20:48 add a comment| 1 Answer 1 active oldest
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and
Heredoc In Php
policies of this site About Us Learn more about Stack Overflow the
Parse Error: Syntax Error, Unexpected End Of File
company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags undefined index php Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes http://stackoverflow.com/questions/17868387/parse-error-syntax-error-unexpected-t-encapsed-and-whitespace a minute: Sign up Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE up vote 1 down vote favorite I might have a syntax error or something but I don't see nothing. On the echo line, I have the error : [error] [client] PHP Parse error: syntax error, unexpected http://stackoverflow.com/questions/26887704/parse-error-syntax-error-unexpected-t-encapsed-and-whitespace T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/slimtest/views/nuevo.php on line 89 Maybe you can help, because I don't see the error D"= php html compiler-errors syntax-error whitespace share|improve this question edited Nov 12 '14 at 13:15 Machavity 18.2k133259 asked Nov 12 '14 at 13:04 Juan 83 add a comment| 4 Answers 4 active oldest votes up vote 0 down vote accepted This should work: share|improve this answer answered Nov 12 '14 at 13:11 Deepak 1,591516 Thanks, worked perfect. –Juan Nov 12 '14 at 14:10 add a comment| up vote 0 down vote When using array variables inside of strings it's usually better to use the complex syntax: echo "(''.'
)"; Alternatively you can remove the quotes in the array key: echo "(''.'
)"; PHP String Variable Parsing share|improve this answer answered Nov 12 '14 at 13:10 Jim 17.5k32859 add a comment| up vote 0 down vote Try changing echo line to this: echo ''; share|imp
here for a quick overview of the site Help Center http://stackoverflow.com/questions/33693461/how-to-fix-parse-error-syntax-error-unexpected-t-encapsed-and-whitespace Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x syntax error Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to fix Parse error: syntax error,unexpected ";' (T_Encapsed_AND_WHITESPACE) in C:\xampp\htdocs\ [duplicate] up vote -3 down vote favorite syntax error unexpected This question already has an answer here: Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE) [duplicate] 1 answer I don't where I'm going wrong. I keep getting the following error: Parse error: syntax error,unexpected ";' (T_Encapsed_AND_WHITESPACE) in C:\xampp\htdocs... This line is where it seems like where the error located. $query="SELECT * FROM `memberinfo` WHERE `memberid` = '".$mymemberid."'"' ; Full code: