Advertisement
elvenbyte

Untitled

Nov 24th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $("#btnLogin").click(function(){
  2.         var txtLogin = $("#txtLogin").val();
  3.         var txtPassword = $("#txtPassword").val();
  4.        
  5.         $.post("./controller/compruebaLogin.php", {user: txtLogin, contrapass: txtPassword}, function(data){
  6.             alert(data.result);
  7.             if(data.result === "ok"){
  8.                 location.href = "/sections/main.php";
  9.             }else{
  10.                 location.href = "index.php";
  11.             }
  12.         });
  13.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement