Hola a todos.
Bueno, tengo el siguiente código:
<?php
//$query = "select count(*) from usuario where mail='".$_POST["logUsuario"]."' and pass ='".$_POST["logPass"]."';";
$query = 1;
echo("<p align=\"center\">");
//echo("<input name='logUsuario' type='text' disabled readonly='true' value='".$_POST["logUsuario"]."' />");
//echo("<input name='logPass' type='text' disabled readonly='true' value='".$_POST["logPass"]."' />");
if($query == 1){
header("Location: http://g16.colegiosteide.com/ppal/principal.php"); }
else{
//$query = "select count(*) from usuario where mail='".$_POST["logUsuario"]."';";
if($query == 0){
echo("E-mail no existente. <a href='http://g16.colegiosteide.com/inicio.html'>Volver al inicio<a>.");
}
else{
echo("Contraseña incorrecta. <a href='http://g16.colegiosteide.com/inicio.html'>Volver al inicio<a>.");
}
echo("Mail o contraseña no válida. <a href='http://g16.colegiosteide.com/inicio.html'>Volver al inicio<a>.");
}
echo("</p>");
?>
Y casca. dice: Warning: Cannot modify header information - headers already sent by ...
pero si comento la línea de
echo("<p align=\"center\">"); funciona bien. No entiendo porqué, ¿alguna idea?
Gracias.