Guest User

Untitled

a guest
Mar 17th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. var user = $('.username').value();
  2. var pass = $('.password').value();
  3. $.ajax({
  4. type : 'POST',
  5. url : 'login_check.php',
  6. data : {
  7. 'username':user,
  8. 'password':pass,
  9. },
  10. beforeSend: function()
  11. {
  12. $("#Loading").show();
  13. },
  14. success : function(response)
  15. {
  16. if(response=="success" && response!=="fail"){
  17. $('.status').html("Success! Now logging in ......");
  18. setTimeout(' window.location.href = "index.php"; ',4000);
  19. }
  20. else{
  21. $('#Loading i').hide();
  22. $('.status').html("Login fail! Please use correct credentials....");
  23. setTimeout(' window.location.href = "login.php"; ',4000);
  24. }
  25. }
  26. });
  27. }
  28. })
Add Comment
Please, Sign In to add comment