User Logon Procedure Fails

From: Date: Sun, 04 Jul 2004 12:36:34 +0000
Subject: User Logon Procedure Fails
Groups: php.general 
Request: Send a blank email to php-general+get-189663@lists.php.net to get a copy of this message
Another day another problem. This time it appears that users are able to enter their details but I get a query execution error with the following section of code: /* Verify Login */ $sql = "SELECT UserFirstName,UserID,UserPassword FROM RegisteredMembers WHERE UserID='$_POST[TXT_UserID]'"; $result = mysql_query($sql) or die ("couldn't select database"); $num = mysql_num_rows($result); if ($num == 1) //Login Name Was Found { $sql = "SELECT UserID FROM RegisteredMembers WHERE UserID='$_POST[TXT_UserID]' AND password=UserPassword('$_POST[TXT_UserPassword]')"; $result2 = mysql_query($sql) or die("Couldn't execute query #2."); The next to last line is bugging me though. "AND password= etc. because I have a variable declared earlier in the logon page for TXT_UserPassword and the UserPassword column exists but where in the hell is "password"...? Is this another of MySQLs "on the fly" variables...? -- ----------------------------- Michael Mason Arras People www.arraspeople.co.uk -----------------------------

« previous php.general (#189663) next »