Guest User

Untitled

a guest
Sep 4th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <?php
  2.  
  3. $link=mysqli_connect("localhost","root","","raspiserver");
  4.  
  5. if(!$link)
  6. {
  7. echo"Something went wrong.";
  8. }
  9.  
  10. else
  11. {
  12. $user=mysqli_real_escape_string($link,$_POST['username']);
  13. $pwd=mysqli_real_escape_string($link,$_POST['pass']);
  14. $result=mysqli_query($link,"SELECT * FROM login WHERE Username='$user' AND Password='$pwd'");
  15.  
  16. $count=mysqli_num_rows($result);
  17.  
  18. if($count==1)
  19. {
  20. header('Location:****************///WHAT SHOULD I PUT OVER HERE////*******************');
  21. }
  22. else
  23. {
  24. echo"Password/Username is wrong";
  25. }
  26. }
  27.  
  28.  
  29. ?>
Add Comment
Please, Sign In to add comment