RE: [PHP] How to redirect to other page

From: Date: Wed, 16 Apr 2003 12:45:34 +0000
Subject: RE: [PHP] How to redirect to other page
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-144108@lists.php.net to get a copy of this message
Hi Try something like this: // 1 passed authentication if ($status == 1) { //redirect to Main Page header("Location: ./main_page.php"); exit(); } else //user pass failed { //redirect to error page header("Location: error.php?e=$status"); exit(); } Hope that helps... Ross ¤-----Original Message----- ¤From: Jack [mailto:nedcor4@nedcor.com.hk] ¤Sent: 16 April 2003 02:37 ¤To: php-general@lists.php.net ¤Subject: [PHP] How to redirect to other page ¤ ¤ ¤Dear all ¤I had write a script which will check the username and password from user ¤input, there is a question about php is : ¤How i can redirect the user back to the login page when the ¤script found out ¤the username or password is wrong / blank? ¤ ¤What script does it use to redirect? ¤ ¤Thx a lot ¤ ¤jack ¤ ¤ ¤ ¤-- ¤PHP General Mailing List (http://www.php.net/) ¤To unsubscribe, visit: http://www.php.net/unsub.php ¤

« previous php.general (#144108) next »