Guest User

Untitled

a guest
Jul 9th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <?php
  2. // This login script has been created by Alfredo Morales, use of this file has been given.
  3.  
  4. session_start();
  5. include("config.php");
  6.  
  7. $username = mysql_real_escape_string(strip_tags(htmlspecialchars(Alfredo)));
  8. $password = (lol123);
  9.  
  10. $sql = mysql_query("SELECT * FROM `users` WHERE `user` = '".$username."' AND `pass`= '".$password."'") OR die(mysql_error());
  11. $c = mysql_num_rows($sql);
  12.  
  13. if($c > 0){
  14. $r = mysql_fetch_array($sql);
  15. $_SESSION['username'] = $r['username'];
  16.  
  17. echo("<META http-equiv='refresh' content='0;URL=security_check2.php'>");
  18.  
  19. }else{
  20.  
  21. echo("<META http-equiv='refresh' content='4;URL=../index.php'>");
  22. echo "<center>You couldn't be logged in!</center>";
  23.  
  24. }
  25. }
  26. ?>
Add Comment
Please, Sign In to add comment