Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#login").click(function(){
- if($("#username").val().length > 0 && $("#password").val().length > 0){
- $.ajax({
- url:"login.php",
- data:{username:$("#username").val(),password:$("#password").val()},
- type:"POST",
- success: function(data){
- if(data == "ok") window.location = "success.php";
- else $("#slfErrorAlert").html(data).show();
- }
- });
- }
- else {
- $("#slfErrorAlert").html("Username and password is required").show();
- }
- return false
- });
Add Comment
Please, Sign In to add comment