|
Posted by Toby A Inkster on 08/17/07 10:48
Heikki wrote:
> my index.php has link-menu in a right side, that opens something.php
> next to the menu.
>
> something.php has a link link-menu at the top of the page that should
> open stuff.php under this last menu.
Because $_GET['sivu'] can only ever take one value at a time, only one of
"something.php" or "stuff.php" can ever be included at once.
Try this in something.php:
<?php
$sivut2 = array('stuff','stuff2');
if (in_array($_GET['sivu2'], $sivut2))
{
include ($_GET['sivu2'] . '.php');
}
else
{
include('error.php');
}
?>
<a href="index.php?sivu=something&sivu2=stuff">stuff</a>
<a href="index.php?sivu=something&sivu2=stuff2">stuff2</a>
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 57 days, 14:25.]
Elvis
http://tobyinkster.co.uk/blog/2007/08/16/elvis/
Navigation:
[Reply to this message]
|