Advertisement
Guest User

Untitled

a guest
Oct 26th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. <!DOCTYPE html><html><head><meta charset="utf-8"></head><body>
  2. <?php
  3. //$username = $_POST["username"];
  4. $password = $_POST["password"];
  5. $con = mysqli_connect("", "root", "", "userdaten");
  6. $usernameabfrage = "SELECT password FROM daten WHERE username = '$_POST[username]'";
  7.  
  8. $res = mysqli_query($con,$usernameabfrage);
  9. $erg = mysqli_fetch_array($res);
  10. $num = mysqli_num_rows($res);
  11.  
  12. if($num > 1 || $num == NULL)
  13. {
  14. echo "Mehrfache User";
  15. }
  16. else
  17. {
  18. if($password == $erg["password"])
  19. {
  20. echo "Erfolgreich eingeloggt";
  21. }
  22. else
  23. {
  24. echo "Falsche Eingabe";
  25. }
  26. }
  27.  
  28. ?>
  29. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement