mike177 Posted June 15, 2008 Share Posted June 15, 2008 Hi, I'm getting a parse error on ling 44 which is $query line. I've checked through the file and from what I can see its all up to scratch. Any suggestions - I attched the complete file if your feeling adventurace. function confirmPass($email, $pass){ if(!get_magic_quotes_gpc()){ $email = addslashes($email); } $query = "SELECT password FROM "Accounts" WHERE email = '$email'"; $result = mysql_query($query); if(!$result || (mysql_num_rows($result) < 1)){ return 1; } $dbarray = mysql_fetch_array($result); $dbarray['password'] = stripslashes($dbarray['password']); $password = stripslashes($pass); if($password == $dbarray['password']){ return 0; } else{ return 2; } } [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/110268-unexpected-t_string/ Share on other sites More sharing options...
tapos Posted June 15, 2008 Share Posted June 15, 2008 change this $query = "SELECT password FROM "Accounts" WHERE email = '$email'"; to bellow $query = "SELECT password FROM 'Accounts' WHERE email = '$email'"; Link to comment https://forums.phpfreaks.com/topic/110268-unexpected-t_string/#findComment-565785 Share on other sites More sharing options...
The Little Guy Posted June 15, 2008 Share Posted June 15, 2008 change this $query = "SELECT password FROM "Accounts" WHERE email = '$email'"; to bellow $query = "SELECT password FROM 'Accounts' WHERE email = '$email'"; Your wrong too. its: $query = "SELECT `password` FROM `Accounts` WHERE `email` = '$email'"; Link to comment https://forums.phpfreaks.com/topic/110268-unexpected-t_string/#findComment-565786 Share on other sites More sharing options...
tapos Posted June 15, 2008 Share Posted June 15, 2008 yes, thanks little guy Link to comment https://forums.phpfreaks.com/topic/110268-unexpected-t_string/#findComment-565787 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.