Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/06/2008, 00:59
usuaria
 
Fecha de Ingreso: marzo-2007
Mensajes: 302
Antigüedad: 17 años, 1 mes
Puntos: 2
Pregunta no me toma la cookie luego de cerrar navegador

Código:
<?php  if(isset($_COOKIE['probando'])) {

        $_COOKIE['probando']++;
        setcookie("probando",$_COOKIE['probando']);

    } else {
        setcookie("probando",1,30);
    }
	
	echo $_COOKIE['probando']; 
	?>

<html>
<head>
	<title> Index </title>
	<link rel="stylesheet" href="estilo.css" type="text/css" />
</head>
<body>

<div class="formato"> <?php echo $_COOKIE['probando'];?></div>

<div class="cabezal">
<form action="sesion.php" method="POST" style="">
  <label><span>Usuario</span>
  <input type="Text" name="usuario" size="15" maxlength="10">
  </label><br>

  <label><span>Constrasenia</span>
  <input type="password" name="contrasenia" size="8" maxlength="10">
  </label><br>
  <input id="btn" type="Submit" value="ENTRAR"><br>
</form>

</div>
</body>
</html>
Queria saber porque cuando cierro el navegador y vuelvo a abrir la cookie es como si no existiera y me empieza a contar desde 0 otra vez.

Última edición por usuaria; 01/06/2008 a las 02:29