HI all,
I am newbie to php.I have this fallowing code erroring out.I have no idea get how to handle this error.
Error I get is:
Warning: Cannot add header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\test\CheckLogin.php:2) in C:\Program Files\Apache Group\Apache2\htdocs\test\CheckLogin.php on line 6
I want to redirect(get to next page if I have correct login) to next page .
Any suggestion on this.
Thanks in advance.
Parth
------ CheckLogin.php ---------
<?
function redirect()
{
}
echo "WHAT ABOUT THIS <br>";
$strUserName = $POST["UserName"];
$strPassword = $POST["Password"];
$strWhere=$POST["op"];
$data="temp";
$conn=odbc_connect($data,"","");
$SESSION[name]=$strUserName;
echo "conn:" . $conn ."<br>";
$query = "SELECT * FROM User_Info WHERE UserName ='$strUserName'";
echo $query ."<br>";
$result = odbc_Exec($conn, $query);
if(odbc_result($result, "Pword")==$strPassword)
{
Header("Location:test/test.html");
};
?>