Visa ett inlägg
Oläst 2005-07-20, 08:55 #18
eg0master eg0master är inte uppkopplad
Mycket flitig postare
 
Reg.datum: Oct 2004
Inlägg: 898
eg0master eg0master är inte uppkopplad
Mycket flitig postare
 
Reg.datum: Oct 2004
Inlägg: 898
Stakes, koden funkar inte eftersom isset returnerar bara true eller false (precis som feztis påpekat) och koala har också fel. klart include2.php också inkluderas eftersom det är en serie IF och inte IF..ELSE IF
Du vill göra så här:
Kod:
<?
if (!isset($_GET['x']) || $_GET['x'] == ""){ include 'index.php'; }
else if ($_GET['x'] == "1"){ include '1.php'; }
else if ($_GET['x'] == "2"){ include '2.php'; }
else { include "error.php"; }
?>

<a href="index.php?x=1"> example link </a>
eg0master är inte uppkopplad   Svara med citatSvara med citat