Ver Mensaje Individual
  #5  
Antiguo 29-07-2004
jorgito jorgito is offline
Miembro
 
Registrado: mar 2004
Posts: 25
Reputación: 0
jorgito Va por buen camino
Post Error

Hola de nuevo me sale un error justamente donde se encuetra el header:
Warning: Cannot add header information - headers already sent by (output started at C:\FoxServ\www\graphics\if.php:2) in C:\FoxServ\www\graphics\if.php on line 91
y mi codigo es el siguiente:
Código PHP:
  <?php 
$a
=trim($_POST["login"]);
$b=trim($_POST["pass"]);

if (
$a!="" and $b!=""){
  
$c=mysql_connect("localhost","root");
  
mysql_select_db("omega",$c);
  
$d=mysql_query("select *from pass where LOGIN='$a' and PASS='$b'",$c);
  do{
    
$l=$row["LOGIN"];
    
$p=$row["PASS"];
  }

  while (
$row=mysql_fetch_array($d));
  echo 
"\n";

  if (
$l===$a and $p===$b){
    
$link='http://localhost/graphics/emcriptador.php';
  }
  else{
    echo 
"USUARIO NO REGISTRADO";
  }

  
header("location:$link"); 
}
else {
  
$link="";
  echo 
"<center>Por favor LLene los datos</center>";
}
?>
Hay otra forma de realizarlo:

Última edición por roman fecha: 29-07-2004 a las 03:51:28. Razón: Indentación de código
Responder Con Cita