RE: [PHP] Link

From: Date: Wed, 17 Apr 2002 15:37:21 +0000
Subject: RE: [PHP] Link
Groups: php.general 
Request: Send a blank email to php-general+get-93339@lists.php.net to get a copy of this message
Make sure you exit after you do the Header() Also if you do not have output buffering enabled and you redirect after you display content to the screen this will not work. Modified example from Brian: if(Criteria=$Input) { Header("Location: http://www.yourplace.com/Pagename.php"); exit; } elseif(Criteria=$SomethingElse) { Header("Location: http://www.yourplace.com/somewhereelse.php"); exit; } else { Header("Location: http://www.yourplace.com/error.php"); exit; } The reason for the exit; is to make sure the script terminates after the redirect, the client's browser does not have to follow a redirect. Jason -----Original Message----- From: Brian Drexler [mailto:sysadmin@saginawcontrol.com] Sent: Wednesday, April 17, 2002 9:04 AM To: Ron Allen; php-general@lists.php.net Subject: RE: [PHP] Link if(Criteria=$Input) { Header("Location: http://www.yourplace.com/Pagename.php"); } elseif(Criteria=$SomethingElse) { Header("Location: http://www.yourplace.com/somewhereelse.php"); } else { Header("Location: http://www.yourplace.com/error.php"); } Hope this helps.... Brian -----Original Message----- From: Ron Allen [mailto:allenr@fwd.areur.army.mil] Sent: Wednesday, April 17, 2002 11:05 AM To: php-general@lists.php.net Subject: [PHP] Link I am performing and if elseif and else statement how would I make it so that if a condition is met than it will automatically redirect you to another page???? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#93339) next »