Re: Exit script early
| From: | Adam Voigt | Date: | Tue, 16 Jul 2002 17:10:09 +0000 |
| Subject: | Re: Exit script early | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-107929@lists.php.net to get a copy of this message | ||
exit;
=)
Adam Voigt
adam.voigt@cryptocomm.com
On Tue, 2002-07-16 at 13:08, Michael Zornek wrote:
> 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
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>