Login page shows blank

Posted by user481913 on Stack Overflow See other posts from Stack Overflow or by user481913
Published on 2011-11-12T17:48:12Z Indexed on 2011/11/12 17:51 UTC
Read the original article Hit count: 285

Filed under:

The login page on a project i'm currently fixing up shows blank. i tried echoing some words to find out where the fault lied. I found out that commenting out the below piece of code made it to display.

    elseif( isset($_POST['do_login'] ) ){//Login user
$email = (isset($_POST['login']) && is_string($_POST['login']) && strlen($_POST['login'])<100)?$_POST['login'] : null;
$password  = (isset($_POST['password']) && is_string($_POST['password']) && strlen($_POST['password'])<100)?$_POST['password'] : null;
$remember  = isset($_POST['chkremember']) ? true : false;

$result = $auth->login($email, $password, $remember);
switch($result){
    case 1: $msg = 'You have successfully logged in.'   break;    
    case 2: $msg = 'Your account has not yet been confirmed. <br/> Please check the e-mail message sent by us and click the confirmation code to validate this account. <a href="user_login.php?view=resend&resend_email='.$email.'">resend activation e-mail</a>'; break;
    case 3: $msg = 'Your account is not enabled!';  break;
    case 4: $msg = 'Account with given login credentials does not exist!';  break;
}

}

Can anyone help me figiure out what's wrong with this piece of code?

© Stack Overflow or respective owner

Related posts about php