Advertisement
enochmh2

check cookie

Dec 19th, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. if (isset($_COOKIE['ID_my_site']))
  2.  
  3. //if its there,logs you in and directs to mainpage
  4. {
  5. $_username=$_COOKIE['ID_my_site'];
  6.  
  7. $_pass= $_COOKIE['Key_my_site'];
  8.  
  9. $check=mysql_query("Select * From users WHERE username=
  10. '$username'") or die (mysql_error());
  11.  
  12. while ($info=mysql_fetch_array($check))
  13. {
  14. if ($pass != "info['password'])
  15.  
  16. {
  17.  
  18. }
  19.  
  20. else
  21. {
  22. header("Location:main.html");
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement