Forum Moderators: coopster
So basically I have some codes like this:
//checks database to see if the person already exists
$query = "......"
$result = "......."
$row = ".........."
if($row) {
//set some cookies
//then redirect to another script
header("Location: http://www.example.com/member.php");
} else {
//don't set any cookies
//just redirect to that same page like above
header("Location: http://www.example.com/member.php");
}
Notice how the two header() lines redirect to the same location, and that's where it doesn't work...
Somehow the header() doesn't redirect to the page in the "else" part....I have to change the URL to something else in order for it to work. In other words, if I tell it to redirect to a different page like member_new.php or anything, then it works. It just doesn't work if it's the same URL as above.
//checks database to see if the person already exists
$query = "......"
$result = "......."
$row = ".........."
if($row)
{
//set some cookies
}
//then redirect to another script
header("Location: http://www.example.com/member.php");
edit
----
if you still have a problem it could be something on the member.php page that is incorrect. Are you maybe checking for the cookies when they are not there?
Thanks for you help!