Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.76 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4.  
  5.  mysql_connect("localhost", "xxxxxx", "xxxxxx") or die(mysql_error());
  6.  
  7.  mysql_select_db("xxxxx") or die(mysql_error());
  8.  
  9.  
  10.  
  11.  if(isset($_COOKIE['ID_my_site']));
  12.  
  13.  {
  14.  
  15.   $username = $_COOKIE['ID_my_site'];
  16.  
  17.   $pass = $_COOKIE['Key_my_site'];
  18.  
  19.     $check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error());
  20.  
  21.   while($info = mysql_fetch_array( $check ))  
  22.  
  23.    {
  24.  
  25.  
  26.  
  27.  
  28.  
  29.    if ($pass != $info['password'])
  30.  
  31.     {    header("Location: login.php");
  32.  
  33.     }
  34.  
  35.  
  36.  
  37.  //otherwise they are shown the admin area  
  38.  
  39.   else
  40.  
  41.     {
  42.  
  43.    header("Location: boutique.php");
  44.  
  45.     }
  46.  
  47.    }
  48.  
  49.    }
  50.  
  51.  else
  52.  
  53.  
  54.  
  55.  
  56.  {    
  57.  
  58.  header("Location: login.php");
  59.  
  60.  }
  61.  
  62.  ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement