Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/02/2012, 07:02
neisserian89
 
Fecha de Ingreso: enero-2012
Mensajes: 21
Antigüedad: 12 años, 3 meses
Puntos: 2
Problema seteando una cookie.. probé todo

Buenas a todos.

Código:
<html>
<header>
<?php
	setcookie("usuario",$_GET["u"],time()+86400);
	setcookie("password",$_GET["p"],time()+86400);
	header("location:index.php");
?>
</header>
<body>
</body>
</html>
Código:
<?php
	setcookie("usuario",$_GET["u"],time()+86400);
	setcookie("password",$_GET["p"],time()+86400);
	header("location:index.php");
?>
Código:
<?php ob_start();
?>
<html>
<header>
<?php
	setcookie("usuario",$_GET["u"],time()+86400);
	setcookie("password",$_GET["p"],time()+86400);
	header("location:index.php");
?>
</header>
<body>
</body>
</html>
<?php ob_end_flush() ?>
Y nada, no me setea la jodida cookie, debo de estar muy nulo ahora pero no veo el problema, ¿hay alguno más lúcido?

Ahh, el error es:
Warning: Cannot modify header information - headers already

Gracias.