Forum Moderators: coopster

Message Too Old, No Replies

Parse error: parse error, unexpected T_STRING in /var/www/web75/html/i

         

FLD_de

11:29 pm on Aug 14, 2005 (gmt 0)

10+ Year Member



Parse error: parse error, unexpected T_STRING in /var/www/web75/html/include/user.php on line 241

//does the name exist in the database?
$sql="SELECT * FROM user WHERE user_name='$user_name'";

I can not find the problem

FLD

jatar_k

4:53 am on Aug 15, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld FLD_de,

is that line 241? if it is I can't see the error.

FLD_de

4:56 am on Aug 15, 2005 (gmt 0)

10+ Year Member



yes this is th line

$sql="SELECT * FROM user WHERE user_name='$user_name'";

grandpa

5:16 am on Aug 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Often the error will be on the line number that is reported, but there are situations where a prior line is really causing the problem - the parser just didn't hiccup there.

Check the lines immediately prior to 241. Look for missing semi-colon, a variable name not properly quoted, etc. There is nothing wrong with the code that you posted.

If all else fails, add this line to the top of your script and work your way thru the errors.
error_reporting(E_ALL);

FLD_de

6:43 am on Aug 15, 2005 (gmt 0)

10+ Year Member



I change some code ==> Now I get an error

Parse error: parse error, unexpected $ in /var/www/web75/html/include/user.php on line 397

But the script ends in line 396

jatar_k

7:29 am on Aug 15, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



often when you get a last line error it is an unmatched brace or a (double or single) quote