Forum Moderators: coopster

Message Too Old, No Replies

Other terms besides exit()?

Want the page to keep displaying and the script to just end....

         

sauce

8:33 pm on Sep 26, 2005 (gmt 0)

10+ Year Member



I'm having trouble ending a script... Here is what I want from this:

------------------------
Top page HTML

<?php function mymessage($message) {
echo "
<p align=\"center\"><b>MESSAGE</b></p>
<p align=\"center\">$message</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p align=\"center\"><a href=\"javascript:history.go(-1)\">Back to the previous page</a></p>
";
exit();
}
?>

Bottom page HTML

-------------------

I'm trying to call a message based ona condition but if I use exit it doesn't display the bottom html... if I take exit() out it displays all the message one on top of the other and it shows the bottom HTML...

How can I just end the script so it shows the correct message and then shows the bottom html?

grandpa

8:41 pm on Sep 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Showing the correct message looks like its dependent on whats happening in function mymessage. It's a hard call to make since we haven't seen it.

PHP scripts will stop when they hit exit;. Period. That's normal behaviour.