include.perehod.php:
<?php
echo'<div>
<form action="'.BASEDIR.'perehod.php?">
<select name="page">
<option value="1">FORUM</option>
<option value="2">GUEST</option>
<option value="3">FILES</option>
</select>
<input type="submit" value="GO">
</form>
</div>';
?>
//perehod.php:
<?php
$pages = array(0=>'index.php',1=>'forum',2=>'guest',3=>'download');
$page = isset($_POST['page']) ? abs(intval($_POST['page'])) : 0;
if($pages[$page]!=""){
header('Location: /'.$pages[$page].?'.SID');
}else{
header('Location: /'.$pages[0].?'.SID');
}
?>
Changed: Игорь (22.02.2010 / 18:42)