cohlson2002 Posted March 29, 2006 Share Posted March 29, 2006 Is there a php function to go to a page under a certain condition? For example, someone is on page1, they click on a link which takes them to page2, which, if certain conditions are met, thay would automatically be forwarded to page3 (they really wouldn't even see page2, it would just be a processing page). Is there a "automatic go to page" function?Thanks Link to comment https://forums.phpfreaks.com/topic/6072-go-to-page-function/ Share on other sites More sharing options...
Honoré Posted March 29, 2006 Share Posted March 29, 2006 [!--quoteo(post=359558:date=Mar 29 2006, 08:10 AM:name=cohlson2002)--][div class=\'quotetop\']QUOTE(cohlson2002 @ Mar 29 2006, 08:10 AM) [snapback]359558[/snapback][/div][div class=\'quotemain\'][!--quotec--]For example, someone is on page1, they click on a link which takes them to page2, which, if certain conditions are met, thay would automatically be forwarded to page3 (they really wouldn't even see page2, it would just be a processing page). [/quote]One possible example:if(mycondition == true) {include('page3.php');} else {include('page2.php');} Link to comment https://forums.phpfreaks.com/topic/6072-go-to-page-function/#findComment-21853 Share on other sites More sharing options...
cohlson2002 Posted March 29, 2006 Author Share Posted March 29, 2006 [!--quoteo(post=359562:date=Mar 29 2006, 01:35 AM:name=Honoré)--][div class=\'quotetop\']QUOTE(Honoré @ Mar 29 2006, 01:35 AM) [snapback]359562[/snapback][/div][div class=\'quotemain\'][!--quotec--]One possible example:if(mycondition == true) {include('page3.php');} else {include('page2.php');}[/quote]I tried that, I need to pass a variable to the page I want to go to. When I use an include it will display the page, but without the variable.Any other suggestions Link to comment https://forums.phpfreaks.com/topic/6072-go-to-page-function/#findComment-21940 Share on other sites More sharing options...
trq Posted March 29, 2006 Share Posted March 29, 2006 Use the [a href=\"http://php.net/header\" target=\"_blank\"]header[/a]() function to do a redirect. Link to comment https://forums.phpfreaks.com/topic/6072-go-to-page-function/#findComment-21942 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.