Advertisement
Guest User

Untitled

a guest
Jun 15th, 2016
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. Username: Password: click $(document).ready(function(){ $("#button1").click(function(){ event.preventDefault(); var name = $("#username").val(); var password = $("#password").val(); var request={username:name,password:password}; $.ajax({ method: "POST", url: "test1.php", data: JSON.stringify(request), dataType:"json", contentType:'application/json; charset=UTF-8', success: function(roop){ $("#result").html(roop);}});});}); php code: $value) { $abc[$key]=$value; } $var1=$abc["username"]; $var2=$abc["password"]; return json_encode($abc); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement