Possible Duplicate:
Headers already sent by PHP
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
include 'verify.php';
$verify = new Verify();
$vali = $verify->VerifyUserLogin($_POST['UserEmail'], $_POST['Password']);
if($_SESSION['umUser'] == true)
{
header("Location: ../index.php");
}
else
{
$errorLogin = $_SESSION['loginForm'];
}
}
function VerifyUserLogin($userEmail, $password)
{
$this->connect();
$pass = md5($password);
$result = mysql_query("SELECT * FROM umuser where umUserIsAdmin = 1 and umUserEmail = '".mysql_real_escape_string($userEmail)."' and umUserPassword = '".mysql_real_escape_string($pass)."'");
if (mysql_num_rows($result) > 0)
{
while($row = mysql_fetch_array($result))
{
$_SESSION['umAnanymousGid'] = $row['umUserGID'];
$_SESSION['umUserName'] = $row['umUserName'];
$_SESSION['umUserEmail'] = $row['umUserEmail'];
$_SESSION['umUserId'] = $row['umUserID'];
$_SESSION['umUser'] = true;
}
//echo $_SESSION['umUser'];
//header('Location:../');
}
The problem is its not redirecting to location and generting warning Warning: Cannot modify header information - headers already sent by (output started at ....)
Kindly help
Thanks