OK, let me explain my problem in detail.
If have a template, which contains several embedded tables. When I start my script, I test to see if $_SESSION['admin'] is logged in. If NO, I do not want to run the script anymore, and continue with the HTML tables etc.
if(!isset($_SESSION['admin']))
{
echo "You're not an admin";
exit;
}
My problem is, after I type exit, no code is executed after that, so my tables and HTML, which is needed, is not compiled by the browser. So now my webpage looks half-complete (because the user was not logged in, my page is half missing.)
Ive been using nested loops to get by this, but it gets somewhat complicated.
if(!isset($_SESSION['admin']))
{
echo "You're not an admin";
exit;
}
else if
{
}
else if
{
}
else
I'd like my code to be clearly readable. So to reiterate my question, is there a word I can use besides 'exit' to stop my script, but not the HTML below it?