Re: $header = "Location:........" being ignored!
| From: | Tom Rogers | Date: | Tue, 21 Jan 2003 10:12:08 +0000 |
| Subject: | Re: $header = "Location:........" being ignored! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-132375@lists.php.net to get a copy of this message | ||
Hi,
Tuesday, January 21, 2003, 7:48:04 PM, you wrote:
S> Hi Group,
S> I basically have some simple code such as:
S> ==================================================
S> if ( $_POST['passwd'] != $db['password']
S> { header("Location: loginfailed.html");
S> }
S> //else
S> $header = "Location: success.html";
S> ==================================================
S> however, when I run this code, using a <FORM> to submit password, username,
S> etc...... if the passwords do not match, the page is forwarded to
S> success.html !
S> Is there anything obvious that I am doing wrong?
S> Thanks,
S> Shams
S> p.s. I don't want to use else{} because I have lots of if() checks!
put exit(); after the failed header.
--
regards,
Tom