Tema: Cabeceras
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 17/07/2007, 09:45
rudysoft
 
Fecha de Ingreso: julio-2007
Mensajes: 4
Antigüedad: 16 años, 9 meses
Puntos: 0
HOLA QUE TAL BUENOS DIAS, GENERANDO UNA PAGINA DE REGISTRO, AL REALIZAR EL LOGIN SI MA MANDA A LA PAGINA DE ACCESO A USUARIOS RESGISTRADOS PERO CON ESTE ERROR:

Warning: Cannot modify header information - headers already sent by (output started at /home/edicio53/public_html/acceso.php:2) in /home/edicio53/public_html/ingreso.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at /home/edicio53/public_html/acceso.php:2) in /home/edicio53/public_html/ingreso.php on line 15

BIENEVENIDO AL AREA RESTRINGIDA

SALIR


ALGUIEN ME PRODRIA AYUDAR A SABER COMO PUEDO SOLUCIONARLO? LO AGRADECERE MUCHO EL CODIGO DEL PHP ES ESTE:

<?php
$loginCorrecto = false;
$idUsuarioL;
$nickUsuarioL;
$emailUsuarioL;
$nombreUsuarioL;

if(isset($_COOKIE["usNick"]) && isset($_COOKIE["usPass"]))
{
$result = mysql_query("SELECT * FROM usuarios WHERE usuario='".$_COOKIE["usNick"]."' AND passwd='".$_COOKIE ["usPass"]."'");

if($row = mysql_fetch_array($result))
{
setcookie("usNick",$_COOKIE["usNick"],time()+3600);
setcookie("usPass",$_COOKIE["usPass"],time()+3600);

$loginCorrecto = true;
$idUsuarioL = $row["idusuario"];
$nickUsuarioL = $row["usuario"];
$emailUsuarioL = $row["correo"];
$nombreUsuarioL = $row["nombre"];
}
else
{
//Destruimos las cookies.
setcookie("usNick","x",time()-3600);
setcookie("usPass","x",time()-3600);
}
mysql_free_result($result);
}
?>

DE IGUAL FORMA AL SALIR DE LA PAGINA PARA DESTRUIR LOS COOKIES ME MANDA UN ERROR PARECIDO:

CERRASTE BIEN TU SESION
Warning: Cannot modify header information - headers already sent by (output started at /home/edicio53/public_html/salir.php:2) in /home/edicio53/public_html/salir.php on line 3

Warning: Cannot modify header information - headers already sent by (output started at /home/edicio53/public_html/salir.php:2) in /home/edicio53/public_html/salir.php on line 4

Y MI CODIGO PHP ES ETES:

CERRASTE BIEN TU SESION
<?php
setcookie("usNick","x",time()-3600);
setcookie("usPass","x",time()-3600);
?>

HELP ME POR FAVOR ME URGE GRACIAS!!!!!!!!!!!!!!!!!!

Muchas gracias por la bienvenida mauled, y ya corregi el problema en la salida ya no manda el error, pero cuando hago el login aun manda dicho error, dice que no debe llevar nada antes de las cookies eso incluye lo que esta de color rojo??, tampoco debe ir?? si es asi que puedo hacer ya que esta parte es la que indica si ya se habia logueado el usuario, gracias

<?php
$loginCorrecto = false;
$idUsuarioL;
$nickUsuarioL;
$emailUsuarioL;
$nombreUsuarioL;

if(isset($_COOKIE["usNick"]) && isset($_COOKIE["usPass"]))
{
$result = mysql_query("SELECT * FROM usuarios WHERE usuario='".$_COOKIE["usNick"]."' AND passwd='".$_COOKIE ["usPass"]."'");

if($row = mysql_fetch_array($result))
{
setcookie("usNick",$_COOKIE["usNick"],time()+3600);
setcookie("usPass",$_COOKIE["usPass"],time()+3600);

Última edición por GatorV; 17/07/2007 a las 10:26