Advertisement
Guest User

Untitled

a guest
Feb 16th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1.  
  2.  
  3.  
  4. http://stackoverflow.com/questions/4015324/http-request-with-post
  5.  
  6.  
  7. <?php
  8. $con = new mysqli('localhost','s549_apex','lEroR','s49_apex');
  9.  
  10. $username = $con->real_escape_string($_POST["username"]);
  11. $password = $con->real_escape_string($_POST["password"]);
  12. $password =md5($password);
  13.  
  14. $sql = "select * from users where username='$username' and password='$password'";
  15.  
  16. $res = $con->query($sql);
  17.  
  18. $check = $res->fetch_array();
  19.  
  20. if(isset($check)){
  21.  
  22. echo "true";
  23.  
  24. }else{
  25. echo "false";
  26. }
  27.  
  28. mysqli_close($con);
  29.  
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement