2017-12-26 5 views
-2

이것은 정말 짜증나, 나는 그것을 얻지 못한다 ... Isset을 선택하고 그렇지 않다면 나는 veraialbe를 할당한다. 그러나 나는 다음 수표와 모든 것을 얻는다. veriable은 그때 설정되어서는 안됩니다 ... 그리고 if (! isset ($ _ SESSION [ 'foo'])는 hissy fit을 통해 verible/index를 얻을 수없는 이유는 무엇입니까? 는 isset을 아닌가요 .. 어쨌든, 내 코드를 보면. 사람이 설정되지 않을 이유를 볼 수 있습니다 .. 감사합니다 ..

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 = 대신해 == 하였다. 플러스 나는 체크가 포스트 인 경우에 추가했다. 검토 주셔서 감사합니다.

관련 문제