Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- $("#box-login").submit(function() {
- $.ajax({
- type : 'POST',
- url : '/Single/safebox/php/login_vai.php',
- dataType : 'json',
- data : {
- username : $('#username').val(),
- password : $('#password').val()
- },
- success : function(data){
- alert(data);
- if(data == '0')//if aphp return value "0"
- { alert ("0");
- $("#content-login .error").show();
- }
- else if(data == '1')//if it returns "1"
- { alert ("1");
- $("#content-login .error").hide();
- }
- }
- });
- })
- });
Add Comment
Please, Sign In to add comment