Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.ajax({
- type: 'POST',
- url: 'login.php',
- data: {lgnUsername: $("#lgn_username").val(), lgnPassword: $("#lgn_password").val()},
- success: function(data){
- $( ".lgn_progress" ).addClass( "hide" )
- if (data.indexOf('success') >= 0) {
- var SessionHash = data.replace("success:", "");
- setCookie('hash',SessionHash)
- location.reload();
- }else if (data == 'error1') {
- M.toast({html: 'Wrong username or password!'})
- $( "#lgn_password" ).addClass( "invalid" );
- $( "#lgn_username" ).addClass( "invalid" );
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement