Hello all, I've been trying to get this login script to work for days and still no luck. Below is the error I keep getting and the script. Any help would be greatly appreciated. Thanks.
Warning: Cannot modify header information - headers already sent by (output started at /home/sandbox/public_html/irm/include/config.inc.php:141) in /home/sandbox/public_html/irm/login.php on line 61
<?php
$cfg_dbdb = $dbuse;
require("./include/irm.inc");
# kludge for sessions
#$_SESSION['cfg_dbdb'] = $cfg_dbdb;
$cfg_dbdb = $dbuse;
#error_reporting(16);
$user = new User();
$user = new User($name);
if($user->authenticate($name, $password))
{
commonHeader("Login");
print "Bad username or password.";
commonFooter();
logevent(-1, "IRM", 1, "login", "Failed login: $name");
} else
{
$password = md5($password);
$IRMName = $name;
$IRMPass = $password;
if ($f_req=='yes')
{
header("Location: users/faq-index.php");
$user->initPrefs();
} else
{
header("Location: users/");
$user->initPrefs();
}
}
?>