Posts: 84
Location: Brussels, Belgium
|
Quote:
Originally Posted by Foundationflash
Ifelse? Surely you mean elseif:
|
Yeah, I know, it was a mistake.
I tried the code you posted, but I always got the error " Error!" written on my screen.
I tried it with several ways, but always Parse Errors, T_IS_EQUAL, T_VARIABLE, expected and unexpected { and ('s, ...
Quote:
Originally Posted by Foundationflash
Actually, I would also consider not having a default setting; otherwise one could in theory get the page to load a spam page or something else malicious; just use a series of elseif()s to allow only a set range of pages, if it is possible and convienient, of course.
|
But if they change, they only get the change on their screen... they can 't change the pages on my server?
I can 't see how they can do something evil with it...
You mean I have to do it like this: with the elseif things:
PHP Code:
<?php if (isset($_GET['page'])) { if($_GET['page']=='home') { include('home.php'); } elseif($_GET['page']=='news') { include('news.php'); } elseif($_GET['page']=='links') { include('links.php'); } } ?>
But than it's quite the same as the SWITCH trick in my first post.
Is it also unsecure with the SWITCH trick?
Last edited by Bulevardi; 10-11-2007 at 01:02 PM..
|