2017-12-26 18 views
-2

これは本当に迷惑ですが、私はそれを取得しません... Issetをチェックし、そうでなければ私はveraialbeを割り当てます..しかし、私は次のチェックとallthough (なぜなら、私はそれを得ることはできません、それは本当のことではありません。 ISSETおかげ..誰もが、これは設定されない理由を見ることができます。私のコードを見て、とにかく...それをaintの...

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';} 

場合( !isset($ _ SESSION ['loggedin'])){$ _SESSIO N [ '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';} 

答えて

0
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';} 

Iは、=の代わりに==ました。プラス私はポストの場合はチェックを追加しました。レビューをいただきありがとうございます。

関連する問題