这个问题在这里已有答案:
这真的很烦人,我不明白... Icheck the Isset然后我分配veraialbe ..但我接下来检查,尽管可靠的应该设置它然后不...而为什么if (!isset($ _ SESSION ['foo']如果没有可靠的/索引,我没有得到它,那就是整个点(!isset aint it ..无论如何,看看我的代码。可以任何人看到一个为什么这不会被设置..谢谢..
SESSION ['loggedin']问题。
if ($_SESSION['homepage']='001') {$_SESSION['message']==$_SESSION['message']; unset($_SESSION['homepage']);} // if message comes from anything other than the login post
(!isset($_SESSION['homepage'])) { $_SESSION['message']==$_SESSION['message']}; // if message comes from anything other than the login post
if (isset($_SESSION['loggedin'])) {$_SESSION['loggedin']=$_SESSION['loggedin'];} else {$_SESSION['loggedin=']='000';}
if(!isset($ _ SESSION ['loggedin'])){$ _SESSION ['loggedin'] ='000';}
if (!isset($_SESSION['message'])) { $_SESSION['message']='Please Log into an Account';}
if (isset($_POST['email'])) {
unset($_POST['email']);
unset($_POST['confirmemail']);
unset($_POST['password']);
unset($_POST['confirmpassword']);
}
else
if (isset($_POST['email'])) {
unset($_POST['email']);
unset($_POST['confirmemail']);
unset($_POST['password']);
unset($_POST['confirmpassword']);
}
else
if (isset($_POST['confirmemail'])) {
unset($_POST['email']);
unset($_POST['confirmemail']);
unset($_POST['password']);
unset($_POST['confirmpassword']);
}
else
if (isset($_POST['confirmpassword'])) {
unset($_POST['email']);
unset($_POST['confirmemail']);
unset($_POST['password']);
unset($_POST['confirmpassword']);
};
........THROWS index not defined here......
if (!isset($_SESSION['loggedin']))
{$_SESSION['loggedin']=='000';
$_SESSION['message'] = 'You are NOT Logged into your account <br> Please Log in';}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if ($_SESSION['homepage']='001') {$_SESSION['message']==$_SESSION['message']; unset($_SESSION['homepage']);} // if message comes from anything other than the login post
(!isset($_SESSION['homepage'])) { $_SESSION['message']==$_SESSION['message']}; // if message comes from anything other than the login post
if (isset($_SESSION['loggedin'])) {$_SESSION['loggedin']=$_SESSION['loggedin'];} else {$_SESSION['loggedin=']='000';}
if (!isset($_SESSION['message'])) { $_SESSION['message']='Please Log into an Account';}
} else { $_SESSION['loggedin=']='000'; $_SESSION['message']='Please Log into an Account'; }
if (isset($_POST['email'])) {
unset($_POST['email']);
unset($_POST['confirmemail']);
unset($_POST['password']);
unset($_POST['confirmpassword']);
}
else
if (isset($_POST['email'])) {
unset($_POST['email']);
unset($_POST['confirmemail']);
unset($_POST['password']);
unset($_POST['confirmpassword']);
}
else
if (isset($_POST['confirmemail'])) {
unset($_POST['email']);
unset($_POST['confirmemail']);
unset($_POST['password']);
unset($_POST['confirmpassword']);
}
else
if (isset($_POST['confirmpassword'])) {
unset($_POST['email']);
unset($_POST['confirmemail']);
unset($_POST['password']);
unset($_POST['confirmpassword']);
};
if (!isset($_SESSION['loggedin']))
{$_SESSION['loggedin']='000';
$_SESSION['message'] = 'You are NOT Logged into your account <br> Please Log in';}
我是==而不是=。加上我添加了支票,如果发布。感谢REVIEW。