While using the following code i get an error:
Warning: Cannot add header information - headers already sent by (output started at header.php:44) users.php on line 169
function DoLogin($SubUserName, $SubPass)
{
global $SetInfo, $dbi;
$Q04 = "SELECT *, password('$SubPass') as SubPassEnc
FROM csi_users
WHERE username = '$SubUserName'";
$R04 = mysql_query($Q04,$dbi) or die("Bad Q04:".mysql_error());
$SetInfo = mysql_fetch_array($R04, $dbi);
if ($SetInfo[password] != $SetInfo[SubPassEnc])
{
ShowLogin($SubUserName, $SubPass, 2);
}
else if($SetInfo[active] == 0)
{
ShowLogin('', '', 3);
}
else
{
$info = base64_encode("$SetInfo[user_id]:$SetInfo[username]:$SetInfo{SubPassEnc");
setcookie("user","$info");
Header("Location: forms.php");
}
}
Any help would be appreciated!!! Thanx!! 🙂