Advertisement
Guest User

Untitled

a guest
May 21st, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. if(!empty($_POST['submit']))
  2.     {
  3.         if(!empty($_POST['username']) && !empty($_POST['password']))
  4.         {
  5.             $password = md5($_POST['password']);
  6.             $sql = mysql_query("SELECT * FROM login WHERE username = '".dRead($_POST['username'])."' AND password = '".dRead($password)."' LIMIT 1");
  7.             if(!mysql_fetch_array($sql))
  8.             {
  9.                 echo mysql_errno.": ".mysql_error();
  10.             }
  11.             else
  12.             {
  13.                 echo "bauch";
  14.                 //setcookie("loggedin", 1, time()+3600);
  15.                 //header("Location: /admin/index.php");
  16.             }
  17.         }
  18.         else
  19.         {
  20.             header("Location: login.php");
  21.         }
  22.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement