Re: User Redirection if login fails
| From: | John Nichel | Date: | Thu, 08 Jul 2004 14:28:59 +0000 |
| Subject: | Re: User Redirection if login fails | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-189965@lists.php.net to get a copy of this message | ||
Harlequin wrote:
Hi again. My code simply asks for a username and password but even if they insert incorrect details the called page is displayed. How can I get them to be redirected to another page if their login information is incorrect...?How are you checking the result? From a db? If so, run your query before any output to the browser on the page where your form is posted too (ex. SELECT * FROM users WHERE name = '$name' && password='$password'). If your query returns no results, redirect them with the header() function. -- John C. Nichel KegWorks.com 716.856.9675 john@kegworks.com