Guest User

Untitled

a guest
Jun 5th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <html>
  2. <head />
  3. <body>
  4. <form action="/test/index.php" method=POST>
  5. Username: <input type="text" name="user">
  6. Password: <input type="password" name="pass">
  7. <input type="submit" value="Submit">
  8. </form>
  9.  
  10.  
  11. <?php
  12.  
  13. $user=$_POST['user'];
  14. $pass=$_POST['pass'];
  15. $login=$_GET['login';
  16.  
  17. if=($login=='yes');
  18. $con=mysql_connect('mysql6.000webhost.com','a2160349_login','domo11');
  19. mysql_select_db('a2160349_login');
  20.  
  21. $get=mysql_query(SELECT count(id) FROM a2160349_login WHERE user='$user' and pass='$pass');
  22. $result=mysql_result($get, 0);
  23.  
  24. mysql_close($con);
  25. if ($result=1) echo "Login FAIL";
  26. else(
  27. echo "Login WOOT!";
  28. $_SESSION['user']=$user;
  29. ?>
  30. </body>
  31. <html>
Add Comment
Please, Sign In to add comment