我正在嘗試使用$ _GET vars(params)創建一個動態頁面,並且如果var等於某些內容,它就會工作。但是,如果var不等於某個東西,那麼它或者顯示內容,或者不顯示錯誤;或顯示錯誤,並在同一時間內容
<?php
if(!isset($_GET['type'])){
header("location: ?type=login");
} else {
$type = trim(strip_tags(stripslashes(mysql_real_escape_string($_GET['type']))));
}
if($type != 'login' || $type != 'register'){
?>
<h1>What your looking for can't be found!</h1>
<?php
}
if($type == 'login'){
?>
<h1>Login page:</h1>
<?php
}
if($type == 'register'){
?>
<h1>Register page:</h1>
<?php
}
>