This is the error I get
Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub\wwwroot\PHP\loggedin.php:3) in C:\Inetpub\wwwroot\PHP\loggedin.php on line 14
for the following code (beginnig part)
<html>
<head>
<?
$username=$POST["txtName"];
$password=$POST["txtPass"];
$link = ODBC_connect("sixs", "", "");
//mssql_select_db("MyDB", $link);
$SQL = "SELECT E_D, E_C, E_N, E_P FROM T_E_HEADER WHERE E_C = '$username'";
$rs = ODBC_exec($link, $SQL);
$row = ODBC_fetch_row($rs);
if ($row=="")
{
Header("Location: http://localhost/PHP/sigmaphp.php?");
/Header("Location: [url]http://[/url]".
$SERVER['HTTP_HOST'].dirname($SERVER['PHP_SELF']).
"/sigmaphp.php"); /
exit;
}
else
{
$SESSION["Name"] = ODBC_result($rs,"E_N");
$SESSION["Department"]=ODBC_result($rs,"E_D");
The error appeared after I introduced the lines for redirecting the user to another page using header (Location:______)
Please help or advise if you need me to advise anything more
Thanks