function logout() { //USO LA LIBRERIA JQUERY $.post("/login.php" , {logout:1}}); }
if(isset($_POST["logout"]) && $_POST["logout"] == 1){ userLogout(); redirect("http://".$_SERVER['HTTP_HOST']."/"); }