File: template/js/zaloguj-user.js

Recommend this page to a friend!
  Classes of adam berger  >  Separation Database Queries  >  template/js/zaloguj-user.js  >  Download  
File: template/js/zaloguj-user.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Separation Database Queries
Database access trait using PDO
Author: By
Last change:
Date: 3 years ago
Size: 1,501 bytes
 

Contents

Class file image Download
  jQuery(document).ready(function($) {
       
              $('#form-loguj').submit(function(e){
                    //alert('dsaaaa');
                      e.preventDefault();
                  // event.defaultPrevented();  
     $.post('pliki/zaloguj-user.php', $(this).serialize(), function(dane) {
			var dane1 = $.parseJSON(dane);
                        //"email-haslo"
                        // "email"
                        //alert(dane1['Login']);
                    
                    if(dane1['Login'] === 'sukces'){
                       //alert(dane1['Login']); 
                     window.location.reload();
                     window.location.href="index.html";
                       $('#error').html("Sukces").addClass('error');
                    }else if(dane1['Login'] === false){
                       // alert(dane1['Login']);
                      $('#error').html("B??d Logowania").addClass('error');  
                    }
                    
                    if(dane1['Login'] === "email"){
                       //alert(dane1['Login']); 
                       $('#error').html("Podaj prawid?owy email").addClass('error');
                    }
                    
                    if(dane1['Login'] === "email-haslo"){
                       //alert(dane1['Login']);
                       $('#error').html("Podaj prawid?owy email lub Has?o").addClass('error');
                    }       
               });
              
            });
});

For more information send a message to info at phpclasses dot org.