Forum Moderators: coopster

Message Too Old, No Replies

Parse error: syntax error, unexpected T CONSTANT ENCAPSED STRING

         

ryanharper

2:48 pm on Jan 8, 2010 (gmt 0)

10+ Year Member



I am getting this error message on my page

"Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/content/r/y/a/ryanharper/html/login-exec.php on line 58"

line 58 is:

$qry="SELECT * FROM members WHERE login='$login' AND passwd='".md5($_POST['password'])"'AND is_approved = '1'";

i think it has to do with the AND is_approved area. thisis for a password protect page that needs admin approval

any help is greatly appreciated

thx

RH

d40sithui

3:59 pm on Jan 8, 2010 (gmt 0)

10+ Year Member



Hmm,
might be that you did not concatenate properly between the md5() and the "AND"(missing dot). See below.
$qry="SELECT * FROM members WHERE login='$login' AND passwd='".md5($_POST['password'])."'AND is_approved = '1'";

rocknbil

10:15 pm on Jan 8, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Correct, but you'll now have a mysql error. :-) add a space before the AND that precedes is_approved.

$qry="SELECT * FROM members WHERE login='$login' AND passwd='" . md5($_POST['password']) . "' AND is_approved = '1'";