chinmay.sahoo New member Jan 25, 2016 #1 An AJAX request can be in any format: Text File HTML JSON object
L ldhseo New member Jan 27, 2016 #2 Depend On the User. $(document).ready(function(){ $("#loginButton").click(function(){ var username=$("#userName").val(); var password=$("#passWord").val(); if(username==''){ $("#userName").focus(); }else{ if(password==''){ $("#passWord").focus(); }else{ $.ajax({ url:"functions.php", type:"POST", data:{'action':'fetch_main_user','username':username,'password'assword}, dataType:"json", success:function(response){ if(response.bool){ $(".response-body").html('<td colspan="2"><span class="alert alert-success">'+response.msg+'</span></td>'); }else{ $(".response-body").html('<td colspan="2"><span class="alert alert-danger">'+response.msg+'</span></td>'); } // $("#userName").val(''); // $("#passWord").val(''); } }); //End Ajax } } }); }); Ajax login with php and mysql
Depend On the User. $(document).ready(function(){ $("#loginButton").click(function(){ var username=$("#userName").val(); var password=$("#passWord").val(); if(username==''){ $("#userName").focus(); }else{ if(password==''){ $("#passWord").focus(); }else{ $.ajax({ url:"functions.php", type:"POST", data:{'action':'fetch_main_user','username':username,'password'assword}, dataType:"json", success:function(response){ if(response.bool){ $(".response-body").html('<td colspan="2"><span class="alert alert-success">'+response.msg+'</span></td>'); }else{ $(".response-body").html('<td colspan="2"><span class="alert alert-danger">'+response.msg+'</span></td>'); } // $("#userName").val(''); // $("#passWord").val(''); } }); //End Ajax } } }); }); Ajax login with php and mysql