Jump to content

Question about headers


nphls

Recommended Posts

I'd like to know if you could give me a help in headers. I don't know how to use them.

My code is like this:

[code]//PASSWORD VERIFICATION
if (($pass)!=($pass2)) //if the values stored in the 2 variables are
//different we redirect the users to a previously created error page
{
    header("Location: error-pwverify.php"); //the user will be sent to this page
    Die();
}[/code]

I wanted to display like an error message when the passwrods aren't the same.
I hope you guys fan help me out of this.

Thanks
Link to comment
https://forums.phpfreaks.com/topic/9214-question-about-headers/
Share on other sites

Change your code to the following:
[code]//PASSWORD VERIFICATION
if (($pass)!=($pass2))
{
    header("Redirect: 5; URL=error-pwverify.php"); //the user will be sent to this page after 5 secounds
    die("The password you specified does not match the password set. Please try again.<br /><br />This page will be redirected in 5 secounds");
}[/code]
Link to comment
https://forums.phpfreaks.com/topic/9214-question-about-headers/#findComment-34038
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.