how to automatically open a new page?
Posted: Mon Mar 03, 2003 12:50 pm
How do I use PHP to automatically load a new page into the browser depending on the outcome of an IF statement?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
// Check to see if they were accepted, if so send them to thier specified pages
if ($accepted == "True")
{ // url can be a variable (like I have here) or hard-coded. It can also be relative or absolute.
header("Location: ".$your_url_goes_here);
}
else
{
header("Location: ".$your_url_goes_here);
}
?>