El caso es que sigo teniendo problemas, he probado un codigo de php.net:
Cita: <?php
// crear las cookies
setcookie("cookie[tres]", "cookietres");
setcookie("cookie[dos]", "cookiedos");
setcookie("cookie[uno]", "cookieuno");
// imprimirlas luego que la página es recargada
if (isset($_COOKIE['cookie'])) {
foreach ($_COOKIE['cookie'] as $name => $value) {
$name = htmlspecialchars($name);
$value = htmlspecialchars($value);
echo "$name : $value <br />\n";
}
}
?>
Y recibo estos fallos:
Warning: Cannot modify header information - headers already sent by (output started at /home/arkheclu/public_html/cookie.php:2) in /home/arkheclu/public_html/cookie.php on line 4
Warning: Cannot modify header information - headers already sent by (output started at /home/arkheclu/public_html/cookie.php:2) in /home/arkheclu/public_html/cookie.php on line 5
Warning: Cannot modify header information - headers already sent by (output started at /home/arkheclu/public_html/cookie.php:2) in /home/arkheclu/public_html/cookie.php on line 6