oceans Posted April 19, 2007 Share Posted April 19, 2007 Deer People, Please guide me in php command to redirect from current *.php to another *.php page, thanks. Link to comment https://forums.phpfreaks.com/topic/47694-solved-redirect-to-another-php-page/ Share on other sites More sharing options...
JSHINER Posted April 19, 2007 Share Posted April 19, 2007 header("location: page.php"); So if you want you can use that in an if statement: if() { header("location: nextpage.php"); } Link to comment https://forums.phpfreaks.com/topic/47694-solved-redirect-to-another-php-page/#findComment-232904 Share on other sites More sharing options...
oceans Posted April 19, 2007 Author Share Posted April 19, 2007 Can you give me a real life example, I can't figure out, I just moved in from ASP Link to comment https://forums.phpfreaks.com/topic/47694-solved-redirect-to-another-php-page/#findComment-232908 Share on other sites More sharing options...
JSHINER Posted April 19, 2007 Share Posted April 19, 2007 Well then - welcome to PHP You're going to love it here. What are you trying to do with it? How would you have done it in ASP? For example, if I wanted a page to redirect if name=Bob: if($name=="Bob") { header("location: page.php");} else { echo 'Did not redirect'; } Link to comment https://forums.phpfreaks.com/topic/47694-solved-redirect-to-another-php-page/#findComment-232909 Share on other sites More sharing options...
oceans Posted April 19, 2007 Author Share Posted April 19, 2007 Thanks in ASP we use: Response.Redirect("03-Maintain.asp") Link to comment https://forums.phpfreaks.com/topic/47694-solved-redirect-to-another-php-page/#findComment-232916 Share on other sites More sharing options...
oceans Posted April 19, 2007 Author Share Posted April 19, 2007 I forgot your suggextion works, can you please help me on request "Re: User Input Validation " also, I do it with a breeze in ASP, but PHP it appears tough. Link to comment https://forums.phpfreaks.com/topic/47694-solved-redirect-to-another-php-page/#findComment-232918 Share on other sites More sharing options...
JSHINER Posted April 19, 2007 Share Posted April 19, 2007 Glad it worked ... please hit Solved (bottom left). I will take a look at your other post. Link to comment https://forums.phpfreaks.com/topic/47694-solved-redirect-to-another-php-page/#findComment-232921 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.