Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var user = $('.username').value();
- var pass = $('.password').value();
- $.ajax({
- type : 'POST',
- url : 'login_check.php',
- data : {
- 'username':user,
- 'password':pass,
- },
- beforeSend: function()
- {
- $("#Loading").show();
- },
- success : function(response)
- {
- if(response=="success" && response!=="fail"){
- $('.status').html("Success! Now logging in ......");
- setTimeout(' window.location.href = "index.php"; ',4000);
- }
- else{
- $('#Loading i').hide();
- $('.status').html("Login fail! Please use correct credentials....");
- setTimeout(' window.location.href = "login.php"; ',4000);
- }
- }
- });
- }
- })
Add Comment
Please, Sign In to add comment