Tema: Ayuda header
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/06/2008, 14:40
blackrocha
 
Fecha de Ingreso: noviembre-2004
Mensajes: 181
Antigüedad: 19 años, 5 meses
Puntos: 1
Ayuda header

hola amigos como estan espero que bien tengo un problema con este direccionamiento y no se por q puede ser...
tengo este codigo ...

<?php
if(isset($btningresar))
{
$enlace = mysql_connect('localhost', 'root', '') or die("No pudo conectarse : " . mysql_error());
mysql_select_db("sisproed") or die("No pudo seleccionarse la BD.");
$consulta="SELECT USUARIOS__USUA.USUA_LOGIN, USUARIOS__USUA.USUA_PASSWORD FROM USUARIOS__USUA where USUARIOS__USUA.USUA_LOGIN='$txtlogin' and USUARIOS__USUA.USUA_PASSWORD='$txtpassword'";
$res=mysql_query($consulta) or die("La consulta fall&oacute;: " . mysql_error());
mysql_close();
$num=mysql_numrows($res);

if ($num)
{
session_register('USUA_LOGIN'); $USUA_LOGIN=$txtlogin;
header('location: nueva.php'); //herror


}
else
{
if(isset($num))
{
echo "<script> alert('.ingrese bien los datos.');</script>";
echo "<script> document.location='prueva.php'; </script>";
}

}
}



else
{


echo "<form action='$_SERVER' method='post'>\n";
echo "<center>\n";
//
//echo"<td><img src='/imagen/fotoh1.jpg' width='1024' height='200'></a></td>\n";
//
//foto
echo "<center><h2><b>Inicio</b></h2></center><br><br>\n";
echo "<table border='1' width='100' height='74'>\n";

echo " <tr> \n";
echo " <td width='50%' height='19' bgcolor='#FFFFCC'><strong><font face='Times New Roman, Times, serif' size='1'>Login</font></strong></td>\n";
echo " <td width='50%' height='19' bgcolor='#FFCC00'><input name='txtlogin' type='text' size='15' maxlength='10'></td>\n";
echo " </tr>\n";

echo " <tr> \n";
echo " <td width='50%' height='18' bgcolor='#FFFFCC'><strong><font face='Times New Roman, Times, serif' size='1'>Password</font></strong></td>\n";
echo " <td width='50%' height='18' bgcolor='#FFCC00'><input name='txtpassword' type='password' size='15' maxlength='10'></td>\n";
echo " </tr>\n";

echo "<tr> \n";
echo " <td bgcolor='#FFFFCC'><center></td></center>\n";
echo " <td bgcolor='#FFFFCC'><input type='submit' value='Ingresar' name='btningresar'></td>\n";
echo "</tr>\n";

echo "</table>\n";
echo "</center>\n";

echo "</form>\n";
}

?>

me envia este warnin

Warning: Cannot add header information - headers already sent by (output started at C:\apache\htdocs\proyecto_titulo\prueva.php:12) in C:\apache\htdocs\proyecto_titulo\prueva.php on line 126

ojala pudieran ayudarme porfavor se agradese de ante mano...