Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html><html><head><meta charset="utf-8"></head><body>
- <?php
- //$username = $_POST["username"];
- $password = $_POST["password"];
- $con = mysqli_connect("", "root", "", "userdaten");
- $usernameabfrage = "SELECT password FROM daten WHERE username = '$_POST[username]'";
- $res = mysqli_query($con,$usernameabfrage);
- $erg = mysqli_fetch_array($res);
- $num = mysqli_num_rows($res);
- if($num > 1 || $num == NULL)
- {
- echo "Mehrfache User";
- }
- else
- {
- if($password == $erg["password"])
- {
- echo "Erfolgreich eingeloggt";
- }
- else
- {
- echo "Falsche Eingabe";
- }
- }
- ?>
- </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement