Parse Error: Parse Error, Unexpected T_CONSTANT_ENCAPSED_STRING In Line

Mobile
feeds
Welcome Login | Register

Parse Error: Parse Error, Unexpected T_CONSTANT_ENCAPSED_STRING In Line
  Forums Index
      » PHP Forums
        » » Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in line



Parse Error: Parse Error, Unexpected T_CONSTANT_ENCAPSED_STRING In Line
Post Description:
Post Tags: parse, error, parse, error, unexpected, t, constant, encapsed, string, in, line, free php support, php scripts, php questions, php answers, programming, codes, scripts
This Post Has Been Viewed 182 Times Since Sun Jun 17, 2007 12:31 pm Posted By webune with 0 replies
Parse Error: Parse Error, Unexpected T_CONSTANT_ENCAPSED_STRING In Line
if you are getting this error is because you have an error on you PHP script.
this is the error i got:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/www/htdocs/anything/secured/html/index.php on line 148



for example, i was writing a script to connect to my database and this is what i had on the line the trouble was given:
$sql = "update ".$db_prefix."config set ".$_GET['field']."='".$_POST'value']."' where ".$_GET['field']."=".$_GET['field']."";

then i changed it to this:
$sql = "update ".$db_prefix."config set ".$_GET['field']."='".$_POST['value']."' where ".$_GET['field']."=".$_GET['field']."";

and it worked.

can you tell what i changed to fix the problem in the error on my code?

no, well, i am going to tell you, i was missing a [ on the $_POST['value'] variable, if you look on the first example, you will see that i have $_POST'value'] but i should really have it like this $_POST['value']

so check your code, you have a bad syntax, that's all.

if you need php hosting, you should visit webune.com i host with them and they were able to help me with this error i was having on my php script.


Leave Your Comments






Share
URL:
You can use this HTML code to put it on your website to show your friends this wallpaper. Use this code on your profile like myspace, friendster, Facebook or others. Just Copy and Paste it in your HTML on your websites



Fourms BBCODE:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums





Comments and replies About Parse Error: Parse Error, Unexpected T_CONSTANT_ENCAPSED_STRING In Line




(0) Comments