Posted by Heikki on 08/16/07 15:06
first. sory about bad english.
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.
the broblem is that stuff.php opens to the place of something.php. so
the top link-menu disapears.
I think this is a conflict between index.php and something.php, but I
don t know how to fix it...
code in index.php:
<?php
$sivut = array('something');
if (in_array($_GET['sivu'], $sivut)) {
include ($_GET['sivu'] . '.php');
}
else
{
include('error.php');
}
?>
<a href="index.php?sivu=something">something</a><br>
this works good....
code in something.php:
<?php
$sivut = array('stuff','stuff2');
if (in_array($_GET['sivu'], $sivut)) {
include ($_GET['sivu'] . '.php');
}
else
{
include('error.php');
}
?>
<a href="index.php?sivu=stuff">stuff</a>
<a href="index.php?sivu=stuff2">stuff2</a>
so is it about these $sivut or['sivu'] codes. I tried to change those
but didn t help.
and how to define what page opens first?
whitout klickings....
should be something like this:
if ($sivu ==""){
$sivu = "firstpage";
how do I put it there
thanks
[Back to original message]
|