Advertisement
Guest User

Untitled

a guest
Jun 28th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <script>
  2. $(document).on("click", "#submit", function(event)
  3. {
  4. var user = document.getElementById("name").value;
  5. var pwd = document.getElementById("pwd").value;
  6. $.post("userExistCheck.php",
  7. {
  8. userName: user,
  9. userPass: pwd
  10. },
  11. function(result)
  12. {
  13. if (result == "0")
  14. {
  15. window.location.replace("Moment/momentApp.php");
  16. }
  17. else if (result == "1")
  18. {
  19. alert("Password is incorrect!");
  20. }
  21. else
  22. {
  23. alert("User does not exist!");
  24. }
  25. });
  26. })
  27. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement