Exit script early
| From: | Michael Zornek | Date: | Tue, 16 Jul 2002 17:08:22 +0000 |
| Subject: | Exit script early | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-107927@lists.php.net to get a copy of this message | ||
Ok,
So I'm creating a details.php page where I'm expecting the url to be
something like:
/details.php?id=12345
Thus in my php I have the following:
if (!isset($id))
{ // if no id exsits
// Create a page saying ID not found, goto index
writeHTMLTag();
writeHeader("Error", "never");
writeBodyTag();
writeLogoNav();
echo "<h1>Error: A hospital ID was not found.</h1>
<p>Goto: <a href=\"index.php\">Nursing Career Match</a>
";
writeFooter();
writeHTMLTagCloser();
// what command can I use to end the script right here?
}
else
{ // Run MySQL stuff and display page
}
My question is "what command can I use to end the script [inside the top
part of that if statement]?"
~ Mike
--
Mike Zornek | Project Leader
Apple Student Developers
The Insanely Great Site with the Insanely Long URL
http://www.applestudentdevelopers.org
Personal Site:
http://www.mikezornek.com