Ver Mensaje Individual
  #3 (permalink)  
Antiguo 24/02/2011, 18:23
jrrm
 
Fecha de Ingreso: agosto-2008
Mensajes: 108
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: problema con cookie

prueba2.php
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>

<body>

<?php setcookie("prueba","1",0);?> 
<a href="prueba.php">prueba</a>
</body>
</html>
prueba.php
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>

<body>
<?php echo $_COOKIE['prueba']; ?>
</body>
</html>