Warning: Cannot modify header information - headers already
Posted: Thu Apr 26, 2007 8:59 pm
Hello,
I have 1 problem in my web
is this:
and the conectar.php
thanks for the help
I have 1 problem in my web
is this:
Code: Select all
Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/subdomain/index.php:4) in /home/user/public_html/subdomain/conectar.php on line 22Code: Select all
<?php
session_start();
$_SESSION['Titulo']="title";
$strUsuario=$_REQUEST['usuario'];
$strContrasena=$_REQUEST['contrasena'];
//echo "Usuario: ".$strUsuario." ".$strContrasena. "<br>";
if(($strUsuario!="")||($strContrasena!="")){
$conn=mysql_connect("localhost","dates","dates");
$bd=mysql_select_db("dates",$conn);
$sql = "SELECT id FROM aso WHERE usuario='".$strUsuario."' AND password='".$strContrasena."'";
//echo $sql. "<br>";
$orden_fecha = mysql_query($sql, $conn) or die(mysql_error());
$result = mysql_fetch_assoc($orden_fecha)or die("errores");
$total = mysql_num_rows($result);
//echo "total: ".$total. "<br>";
//if($total!=0){
$_SESSION['usuario']=$result['id'];
//echo "[".$_SESSION['usuario']. "]";
//}
}else{
header("Location: ../index.php"); //<<<<------ line 22
}
?>