Jump to content

[SOLVED] Using 2 headers


sanderphp

Recommended Posts

I have a login page that has a login button and a register button. I'm trying to make it work that if the register button is pushed it will go to the registration page. The login works, but the register isn't.

 

if(isset($_POST['login'])){
// whole bunch of code
header("location:login_success.php");
else {
echo "Wrong Username or Password";
}
}

if(isset($_POST['register'])){
header("location:registrationbackup.php");
}	

?>

 

my form code is

 

<form name="form1" method="post" action="checklogin.php">
<td width="5%" > <input type="submit" name="login" value="login"></td>
<td width="5%" > <input type="submit" name="register" value="register"></td>

Link to comment
https://forums.phpfreaks.com/topic/106405-solved-using-2-headers/
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.