Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. $result = $dbcon->query("SELECT * FROM PT_USERS WHERE Username = '$gebruiker' AND Password = '$wachtwoord'");
  2. while($row = $result->fetch_assoc()) {
  3. if($result->num_rows == 1) {
  4. $_SESSION['PT_USERS'] = $row["Username"];
  5. $_SESSION['PT_CONFIRM'] = $row["Confirmed"];
  6. header("Location: ../");
  7. }
  8. else {
  9. $result = $dbcon->query("SELECT * FROM PT_USERS WHERE Username = '$gebruiker'");
  10. if($result->num_rows == 1) {
  11. echo '<script>alert("Het wachtwoord klopt niet met dit gebruikersnaam!");</script>';
  12. header("Location: ../");
  13. }
  14. else {
  15. echo '<script>alert("Geen account gevonden!");</script>';
  16. header("Location: ../");
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement