SHARE
TWEET

Untitled

a guest Mar 17th, 2018 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top