I used header in my code and I have this error:
Warning: Cannot add header information - headers already sent by (output started at /var/www/html/boris/ingresar.php:4) in /var/www/html/boris/ingresar.php on line 14
this is my code:
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<?
include("conexion.php");
conexion();
$se=mysql_query("select from escritores where usuario='".$usuario."' and password='".$password."'");
if(mysql_num_rows($se)>0){
session_start();
$valido=$usuario;
session_register("valido");
$valido=$usuario;
}else{
header("location: http://www.esbolivia.com/boris/login1.php");
exit;}
if(session_is_registered("valido")){
if($historiaid)
{
$resul=mysql_query("select from historias where id=".$historiaid);
$res=mysql_fetch_array($resul);
}
?>
Then it outputs HTML code, but I don't understand why I can't return to the page login1.php, I use a post method to send data to ingresar.php that is the script Iam showing here.
Please help thanxs in advance.