Advertisement
Sparkster

Untitled

Oct 15th, 2013
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(isset($_POST['username'])) {      
  2.     if(strlen($_POST['username']) >= 3 && strlen($_POST['password']) >= 6) {
  3.         $logged_user = $user_api->login($_POST['username'], $_POST['password']);
  4.         echo "<h1>IT WORKED! Welcome back to Clementeene {$_POST['username']}</h1> <a href='index.php'>Go play!</a>";
  5.         echo "<a href='usercp.php'>Go to control panel</a>";
  6.  
  7.         $_SESSION["logged_in"] = true;
  8.         $_SESSION["username"] = $logged_user['username'];
  9.         $_SESSION["user_id"] = $logged_user['id'];
  10.            
  11.         else if($logged_user == false) {
  12.                 echo "Wrong username or password.";
  13.                 }
  14.         }
  15.  
  16.  
  17.         else {
  18.                 echo "Wrong username or password.";
  19.                 }
  20.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement