RE: [PHP] Exiting from an include or required file

From: Date: Wed, 21 Aug 2002 14:48:03 +0000
Subject: RE: [PHP] Exiting from an include or required file
Groups: php.general 
Request: Send a blank email to php-general+get-113475@lists.php.net to get a copy of this message
Seems like the easy way, at least in this case, would be to make the second part of your File A an "else" to your "if". <?php if (empty($_POST['search_criteria'])) { echo "You must provide search criteria"; } else { echo "You provided search criteria"; } --- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer | at himself, for he shall never cease LeTourneau University | to be entertained." Longview, Texas, USA | -- John Powell > -----Original Message----- > From: Henry [mailto:henryg@markiteer.com] > Sent: Wednesday, August 21, 2002 9:40 AM > To: php-general@lists.php.net > Subject: [PHP] Exiting from an include or required file > > > Hi All, > > I would like to exit from an include file and continue in the calling > script! > > As an example > > FILE A: > > <?php > if (empty($_POST['search_criteria')) > { > echo "You must provide search criteria"; > > // exit the include file here!!!! But how? > } > > echo "You have provided serach criteria"; > ?> > > > FILE B > > #include "A"; > > <form method=post> > <input name=search_criteria type=text> > </form> > > TIA > > Henry > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#113475) next »