Solarpitch Posted May 14, 2007 Share Posted May 14, 2007 Hey Guys, Cant get this right for the life of me . . . whats the correct syntax for the code below... query = "select count(*) from members where username = '$nme' and user_password = '".md5($_POST['password'].'"; Its the embedding of the md5 thats wrong Quote Link to comment https://forums.phpfreaks.com/topic/51345-very-quick-syntax-question/ Share on other sites More sharing options...
chigley Posted May 14, 2007 Share Posted May 14, 2007 $query = "select count(*) from members where username = '$nme' and user_password = '".md5($_POST['password']."'"; Quote Link to comment https://forums.phpfreaks.com/topic/51345-very-quick-syntax-question/#findComment-252853 Share on other sites More sharing options...
roopurt18 Posted May 14, 2007 Share Posted May 14, 2007 You're missing the $ on query. After your last dot operator you have '"; where it should be "'"; Quote Link to comment https://forums.phpfreaks.com/topic/51345-very-quick-syntax-question/#findComment-252854 Share on other sites More sharing options...
Solarpitch Posted May 14, 2007 Author Share Posted May 14, 2007 Thanks a mill guys!! Quote Link to comment https://forums.phpfreaks.com/topic/51345-very-quick-syntax-question/#findComment-252856 Share on other sites More sharing options...
Solarpitch Posted May 14, 2007 Author Share Posted May 14, 2007 Ummmm . . hang on a sec, still not sorted. The code seems fine but I get the error Parse error: syntax error, unexpected ';' in /home/g39197/public_html/member_login.php on line 220 Line... 220.... $query = "select count(*) from members where username = '$nme' and user_password = '".md5($_POST['password']."'"; Quote Link to comment https://forums.phpfreaks.com/topic/51345-very-quick-syntax-question/#findComment-252858 Share on other sites More sharing options...
chigley Posted May 14, 2007 Share Posted May 14, 2007 $query = "select count(*) from members where username = '$nme' and user_password = '".md5($_POST['password'])."'"; Quote Link to comment https://forums.phpfreaks.com/topic/51345-very-quick-syntax-question/#findComment-252860 Share on other sites More sharing options...
Solarpitch Posted May 14, 2007 Author Share Posted May 14, 2007 Ahhhh of course . . I bet you were the kinda guy in school who was really good at jigsaw puzzles!! Quote Link to comment https://forums.phpfreaks.com/topic/51345-very-quick-syntax-question/#findComment-252863 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.