[PHP] how to redirect from one page to an other page in PHP ?
Hi please how to redirect from one page to an onther in php ? ( like it is in ASp : redirect(../index.asp) exemple switch (condition1) { case 1; go to page page1.php; case 2; go to page page2.php; } thanks in advance
RE: [PHP] how to redirect from one page to an other page in PHP ?
I think this is what you'll want. switch (condition1) { case 1; header(Location: page1.php); case 2; header(Location: page2.php); } You need to be careful that you haven't output anything beforehand or you'll get an error message. Even having a blank line before the ?PHP tag will screw you up. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php