Advertisement
Guest User

Untitled

a guest
Aug 30th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. $.ajax({
  2. type: 'POST',
  3. url: 'login.php',
  4. data: {lgnUsername: $("#lgn_username").val(), lgnPassword: $("#lgn_password").val()},
  5. success: function(data){
  6. $( ".lgn_progress" ).addClass( "hide" )
  7. if (data.indexOf('success') >= 0) {
  8. var SessionHash = data.replace("success:", "");
  9. setCookie('hash',SessionHash)
  10. location.reload();
  11. }else if (data == 'error1') {
  12. M.toast({html: 'Wrong username or password!'})
  13. $( "#lgn_password" ).addClass( "invalid" );
  14. $( "#lgn_username" ).addClass( "invalid" );
  15. }
  16. }
  17. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement