cookie is not being creater at my website

[color=#006699]I did this code to validate if the user is logged using cookie, but my cookie disappear when i click to any link of my web site[link=],[/link] anybody can check where is the issue?

if ( (isset($_POST["login"])) and (isset($_POST["senha"])) ) {

if (preg_match("/<div[^>]*>" . preg_quote(trim($_POST["login"]),"/") . ";" . preg_quote(trim($_POST["senha"]),"/") . ";([^;]*?)/",strip_tags(html_entity_decode(file_get_contents("paginas/area-restrita.php")),"
"),$resultado)) {

$resultado[1] = "area-restrita-" . strtolower($resultado[1]);
setcookie("area-restrita",md5($resultado[1]),time() + 60*60);

window.location = "<?php echo $resultado[1]; ?>";




alert("Login/Senha n


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion