SHARE
TWEET

Untitled

a guest Jun 14th, 2017 215 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.     $_SESSION['uid'] = $user['uid'];
  10.     $_SESSION['user'] = $user['user'];
  11.     if ($user['head'] == "1")
  12.     $_SESSION['head'] = $user['head'];
  13.     header("location:./?strana=admin");
  14.     }
  15. }
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