I'm getting the folloing error:
Warning: Cannot add more header information - the header was already sent (header information may be added only before any output is generated from the script - check for text or whitespace outside PHP tags, or calls to functions that output text) in /home/WWW9/killersurflinks.com/htdocs/dev/login/login.php on line 14
Line 14 is where I use the header() function
Can anyone see where I'm outputing other data
that is cuasing the error message?
The only thing I can think of is the return of my results from the DB. Could that be cuasing the error?
<?php
include("dblib.inc");
//include("session.inc");
$message="";
if (isset($actionflag) && $actionflag =="login")
{
if (empty($form[login]) || empty($form[password]))
$message .="Note: You must fill all fields<BR>\n";
if ( ! ($row_array = checkPass($form[login], $form[password] )))
$message .="Incorect password try again<BR>\n";
if ($message == "") //we found no errors
{
//cleanmembersession( $row_array[custid], $row_array[login], $row_array[password] );
header( "Location:redirect.php?".SID );
exit;
}
}
?>
<head><title>Solana Beach Bakery Company Customer Login</title></head>
<body>
<H1>Login</h1>
<?php
if ($message != "" )
{
print "<p><b><font color=\"red\">$message</font></b></p>";
}
?>
<p>
<form action="<?php print $PHP_SELF;?>">
<input type="hidden" name="actionflag" value="login">
</p>
<p>
Login: <br>
<input type="text" name="form[login]" value="<?php print $form[login]?>">
</p>
<p>
Password: <br>
<input type="password" name="form[password]" value="">
</p>
<p>
<input type="submit" value="LOG IN">
</p>
</form>
</body>