Re: [PHP] Re: php redirection..
I believe it's spelled non-sequitur. =) On 12/16/06, Jonesy <[EMAIL PROTECTED]> wrote: On Fri, 15 Dec 2006 21:07:44 -0800, Casey Chu wrote: > Well... They skip all 's, so they skip 's. Wow! You get The Prize for the best non sequitor of the day. Jonesy -- Marvin L Jones| jonz | W3DHJ | linux 38.24N 104.55W | @ config.com | Jonesy | OS/2 *** Killfiling google posts: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php redirection..
On Fri, 15 Dec 2006 21:07:44 -0800, Casey Chu wrote: > Well... They skip all 's, so they skip 's. Wow! You get The Prize for the best non sequitor of the day. Jonesy -- Marvin L Jones| jonz | W3DHJ | linux 38.24N 104.55W | @ config.com | Jonesy | OS/2 *** Killfiling google posts: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Redirection If Login Fails.
Thanks Jason. I think that's where I was falling down with this one. -- - Michael Mason Arras People www.arraspeople.co.uk - "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Friday 09 July 2004 18:37, Harlequin wrote: > > Here's the code in question: I'd ideally want the user to only be directed > > to this page if login is successful. Directed to another page if > > unsuccessful but even the error messages do not display which I find > > strange... > > [snip] > > >else // password is not correct > >{ > > unset($do); > > $message="The Login Name, '$_POST[TXT_UserID]' > > exists, but you have not entered the correct password! Please > > try again."; > > Do you actually print/echo $message elsewhere in your code? In the code you > posted, I can only see it being assigned by not actually used. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > -- > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > -- > /* > When the bosses talk about improving productivity, they are never talking > about themselves. > */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Redirection If Login Fails.
On Friday 09 July 2004 18:37, Harlequin wrote: > Here's the code in question: I'd ideally want the user to only be directed > to this page if login is successful. Directed to another page if > unsuccessful but even the error messages do not display which I find > strange... [snip] >else // password is not correct >{ > unset($do); > $message="The Login Name, '$_POST[TXT_UserID]' > exists, but you have not entered the correct password! Please > try again."; Do you actually print/echo $message elsewhere in your code? In the code you posted, I can only see it being assigned by not actually used. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* When the bosses talk about improving productivity, they are never talking about themselves. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Redirection If Login Fails.
Here's the code in question: I'd ideally want the user to only be directed to this page if login is successful. Directed to another page if unsuccessful but even the error messages do not display which I find strange... /* Verify Login */ $sql = "SELECT UserFirstName,UserID,UserPassword,FurtherComments FROM RegisteredMembers WHERE UserID='$_POST[TXT_UserID]'"; $result = mysql_query($sql) or die ("could not 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 UserPassword=('$_POST[TXT_UserPassword]')"; $result2 = mysql_query($sql) or die("Couldn't execute query #2. MySQL Error: " . mysql_error()); $num2 = mysql_num_rows($result2); if ($num2 > 0) // password is correct { $_SESSION['auth']="yes"; $logname=$_POST['TXT_UserID']; $_SESSION['logname'] = $logname; $today = date("Y-m-d h:m:s"); $sql = "INSERT INTO Logon (loginName,loginTime) VALUES ('$logname','$today')"; mysql_query($sql) or die("Couldn't execute query. MySQL Error: " . mysql_error()); } else // password is not correct { unset($do); $message="The Login Name, '$_POST[TXT_UserID]' exists, but you have not entered the correct password! Please try again."; } } elseif ($num == 0) // login name not found { unset($do); $message = "The Login Name you entered does not exist! Please try again."; } -- - Michael Mason Arras People www.arraspeople.co.uk - "Harlequin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all I've created a page that allows registered users who have previously > registered and been entered into the database to login. However, for some > reason if a user login fails my code does not display the appropriate error > message. > > Ideally I would like the users to be redirected to another page rather than > the login page if they fail but I need some help with the code. > > Anyone...? > > -- > - > Michael Mason > Arras People > www.arraspeople.co.uk > - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php