Re: User Logon Procedure Fails

From: Date: Mon, 05 Jul 2004 20:00:00 +0000
Subject: Re: User Logon Procedure Fails
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-189748@lists.php.net to get a copy of this message
* Thus wrote Harlequin: > 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"...? Look at your table structure. > > Is this another of MySQLs "on the fly" variables...? no. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid!

« previous php.general (#189748) next »