how to automatically open a new page?
Moderator: General Moderators
-
permutations
- Forum Commoner
- Posts: 52
- Joined: Sat Dec 07, 2002 11:45 am
how to automatically open a new page?
How do I use PHP to automatically load a new page into the browser depending on the outcome of an IF statement?
I think this will help you below, it was posted on here the other day.
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);
}
?>-
permutations
- Forum Commoner
- Posts: 52
- Joined: Sat Dec 07, 2002 11:45 am