daily pastebin goal
5%
SHARE
TWEET

Untitled

a guest May 31st, 2017 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. include("../contact.php");
  3. $username = sql($_POST['username']);
  4. $password = sql($_POST['password']);
  5.  
  6. $query = mysql_query("SELECT * FROM members WHERE username='{$username}' AND password='{$password}' LIMIT 1");
  7. if(mysql_num_rows($query) == '1')
  8. {
  9.     $update_online_status = mysql_query("UPDATE members SET online = 'yes' WHERE username = '$username' AND password = '$password' LIMIT 1") or die(mysql_error());
  10.     $delete_older_lives_login = mysql_query("DELETE FROM lives WHERE type = 'logins'");
  11.     $add_live_status = mysql_query("INSERT INTO `kuken`.`lives` (`id`, `text`, `date`, `type`) VALUES (NULL, '<a href=''profile.php?user=$username''>$username</a> har precis loggat in!', '$datetime', 'logins');");
  12.     $get_same_username = mysql_query("SELECT COUNT(*) FROM members WHERE username = '$username' AND password = '$password'");
  13.     $get_same_usernamee = mysql_query("SELECT * FROM members WHERE username = '$username' AND password = '$password'");
  14.     setcookie("cok_user", "$username");
  15.     setcookie("cok_pass", "$password");
  16.     $_SESSION['sess_id'] = mysql_result($get_same_usernamee, 0, 'id');
  17.     $_SESSION['sess_admin'] = mysql_result($get_same_usernamee, 0, 'admin');
  18.     $_SESSION['sess_user'] = $username;
  19.     echo mysql_num_rows($query);
  20. }
  21.  
  22. ?>
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