Re: Question about the exit() command

From: Date: Thu, 19 Dec 2002 21:55:43 +0000
Subject: Re: Question about the exit() command
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-128912@lists.php.net to get a copy of this message
How about: if (!$conn = mysql_connect($host, $user, $pass)) { include 'static_html.inc'; exit; } print "Welcome, yes the database is connected"; exit ends the script, nothing after its use is executed. Regards, Philip Olson On Thu, 19 Dec 2002, Beauford.2002 wrote: > Hi, > > Could someone clarify this for me. I want to be able to exit out of a PHP > webpage and return to the calling page if certain conditions are not met. It > appears using exit() will do this, but I am unclear exactly how to use it. > > any info is appreciated. > > TIA > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#128912) next »