Page 1 of 1

page redirect

Posted: Thu Jan 25, 2007 11:17 pm
by sarbas
hai...
i want to redirect two pages in a single php page using if... else....
if(...)
{
...
...example.php

}
else
{
...
example1.php

}

Posted: Thu Jan 25, 2007 11:24 pm
by feyd
Image

Posted: Mon Jan 29, 2007 12:22 am
by dude81
:o
Firstly , I think code is not in proper tags, You need to go through Forum rules. Secondly the question should be in PHP code forum but not in Linux. Anyhow You need to go through PHP header function

Code: Select all

if($yourcondition){
 header('Location:example.php');

}else{
header('Location:example1.php');
}
Note: No echo or print messages above these headers.