Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#btnLogin").click(function(){
- var txtLogin = $("#txtLogin").val();
- var txtPassword = $("#txtPassword").val();
- $.post("./controller/compruebaLogin.php", {user: txtLogin, contrapass: txtPassword}, function(data){
- alert(data.result);
- if(data.result === "ok"){
- location.href = "/sections/main.php";
- }else{
- location.href = "index.php";
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement