Advertisement
Guest User

what is wrong

a guest
Mar 30th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. $("#login").click(function(){
  2. if( $("#username").val().length > 0 && $("#password").val().length > 0 ) {
  3. $.ajax({
  4. url:"login.php",
  5. data:{username:$("#username").val(),password:$("#password").val()},
  6. type:"POST",
  7. success: function(data){
  8. if(data == "ok") window.location = "success.php";
  9. else $("#slfErrorAlert").html(data).show();
  10. }
  11. });
  12. } else {
  13. $("#slfErrorAlert").html(data).show();
  14. }
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement