Need some ideas for breaking out of script
Posted: Thu May 20, 2010 3:26 am
I am taking some of my old PHP scripts I was working on before and using them in a new game. However, my old game had basically no design, and was just on a while page. The new game is being added to a template. In the old game, like in the video tutorials, I use the exit command to exit out of a script if the user enters bad information, an error occurs, or I otherwise need to stop execution.
My problem is that it ends execution of the page it its entirety, so the rest of the HTML layout does not get executed, and it becomes a stub, with half the page awkwardly missing.
Is there any command or any way to break out of a PHP script while finishing up the rest of the HTML on the page? I know it can be done logically, which is what I have been doing so far, but all the code editing is getting tiring. Thanks!
My problem is that it ends execution of the page it its entirety, so the rest of the HTML layout does not get executed, and it becomes a stub, with half the page awkwardly missing.
Is there any command or any way to break out of a PHP script while finishing up the rest of the HTML on the page? I know it can be done logically, which is what I have been doing so far, but all the code editing is getting tiring. Thanks!