Ver Mensaje Individual
  #6 (permalink)  
Antiguo 21/12/2011, 06:42
Jennifer_munn
 
Fecha de Ingreso: marzo-2005
Mensajes: 276
Antigüedad: 19 años, 1 mes
Puntos: 0
Respuesta: Problema cookies

OK! Entiendo y funcionó!!!
Os dejo cómo quedo el código por si a alguien le sirve de ayuda:

<?
function miCookie(){
//setcookie("miCookie", "el valor aleatorio ".rand(), time()+3600);
$_COOKIE['miCookie'] = "el valor aleatorio ".rand();
}
if ($_REQUEST["votar"]==1){
miCookie();
}
?>
<!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=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<? print_r($_COOKIE); ?>
<div id="encuestaHome">
PROBANDO COOKIES

<a href="index.php?votar=1">votar</a>
</div>

</body>
</html>