I have a php filled with dozens of if/then, else, and else if statements.
At the top of my page is the if/then statement I'm having trouble with. It goes like this: If such n' such is FALSE, then skip all the junk on my page and go to the bottom. But, I can't get it to, "skip."
<?php
$ref = getenv(HTTP_REFERER);
if(ereg("[part_of_url_to_match]",$ref))
{
loop through the dozens, and I mean dozens of if/then statments on my page
}
else
{
HERE is where I want to skip to!
}
?>
But the problem is, I have so many loops, if/then statements, and curly braces on my page, that surrounding my entire page in "{" and "}" seems to "confuse" php.
Is there an easier way? Something like "go to $flag" or something.
But wait.... I know you might be thinking:
"Well, just REVERSE my first if/then statement with an "!" like this: if(!ereg("[part_of_url_to_match]",$ref))"
But, I am trying to do it the other way to learn the, "principle" behind it.