Hi,
I'm having a few problems with headers. This is the code for my sign_in page:
<? session_start();
include("common/title.php");
include("common/header.php");
include("common/navigation.php");
if ($userid && $password)
{
include ("common/connect.php");
$result = mysql_query("SELECT * FROM login WHERE userid='$userid' AND password='$password'");
if (mysql_num_rows($result)>0)
{
$valid_user = $userid;
session_register("valid_user");
}
}
if (session_is_registered("valid_user"))
{
$dest = "index.php";
header("Location: $dest");
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="common/marketplace.css" rel="stylesheet" type="text/css">
</head>
<body>
<span class="body_text">
<?
echo "<B>Sign In</B>";
if (isset($userid))
echo "<br><br><font color=red>Please enter a valid user name and password.</font>";
echo "<form action='sign_in.php' method=post>";
echo "<table class='body_text'><tr><td><B>User Name</B></td></tr>";
echo "<tr><td><input type=text name='userid' maxlength=15 size=20 class='body_text'> <a href='sign_in_help.php?action=user_form'>Forgot Your User Name?</a></td></tr>";
echo "<tr><td><B>Password</B></td></tr>";
echo "<tr><td><input type=password name='password' maxlength=15 size=20 class='body_text'> <a href='sign_in_help.php?action=password_form'>Forgot Your Password?</a></td></tr></table>";
echo "<input type=submit value='Sign In'></form>";
echo "<br><a href='register.php'>Not a Member?</a> If you want to become a MarketPlace user, you will need to ";
echo "<a href='register.php'>register</a> first. <BR><BR>Registration is <B>fast</B>, <B>easy</B> and <B>free</B>.";
?>
</span>
</body>
</html>
Produces this output when the user signs in:
Warning: Cannot modify header information - headers already sent by (output started at c:\program files\apache group\apache\htdocs\marketplace\common\title.php:1) in c:\program files\apache group\apache\htdocs\marketplace\sign_in.php on line 19
At what point in the code is the end of the header? I think there is still something wrong with my php.ini file?
Thanks,