$session_life) { $_SESSION = array(); session_destroy(); $pag = $_SERVER['SERVER_NAME']."/navidad/salir.php?expired=1"; header("Location: http://".$pag); exit(); } }else{ $_SESSION = array(); session_destroy(); $pag = $_SERVER['SERVER_NAME']."/navidad/salir.php?expired=1"; header("Location: http://".$pag); exit(); } $_SESSION["n_timeout"] = time(); $pag = "../arbol.php"; if(!isset($_POST["texto"]) || trim($_POST["texto"]) == ""){ header("Location: ".$pag."?error=0"); exit(); } //$texto = nl2br(trim(filter_input(INPUT_POST, "texto", FILTER_SANITIZE_SPECIAL_CHARS,array('flags' => FILTER_FLAG_STRIP_LOW))));//limpia texto $texto = nl2br(htmlentities(trim($_POST["texto"]), ENT_QUOTES, "UTF-8"));//limpia texto //actualiza $stmt = $pdo->prepare('Select * from fi_navidaddeseo(:usr, :texto)'); $stmt->bindParam(":usr", $_SESSION["n_usuario_id"]); $stmt->bindParam(":texto", $texto); if(!$stmt->execute()){ header("Location: ".$pag."?error=1"); exit(); } $stmt->closeCursor(); header("Location: ".$pag."?ok=0"); ?>