SHARE
TWEET

Untitled

a guest Jun 14th, 2017 463 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if ($_GET['task'] == "login") {
  2.     $user = addslashes($_POST['user']);
  3.     $pass = md5($_POST['pass']);
  4.  
  5.     $query = "SELECT * FROM users WHERE username='$user' and password='$pass'";
  6.     $user = mysql_fetch_array(mysql_query($query));
  7.     if ($user['uid'] == "") header("location:./?strana=home&notification=badlogin");
  8.     else {
  9.     while($row = mysql_fetch_array(mysql_query($query))) {
  10.         $head = $row['head'];
  11.         if ($head== '1'){
  12.         $_SESSION['head'] = $user['head'];
  13.         }
  14.     }
  15.     $_SESSION['uid'] = $user['uid'];
  16.     $_SESSION['user'] = $user['user'];
  17.     header("location:./?strana=admin");
  18.     }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top