header.html is empty Why am I getting these errors:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\wamp\www\templates\header.html:16) in C:\wamp\www\index.php on line 16
16-- session_start();
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\templates\header.html:16) in C:\wamp\www\index.php on line 20
20-- header('location: member.php');
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
index.html
<table>
<tr>
<td>
<table>
<tr>
<td>
<form method="post" action="index.php">
<label>Username</label><br/><input name="username"/><br/>
<label>Password</label><br/><input name="password" type="password"/><br/>
<input type="submit" name="login" value="login"/>
</form>
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
index.php
<?php
require ("connect/connect.php");
require ('templates/header.html');
if(!$_POST['login']){
$check = mysql_query("SELECT * FROM members WHERE username='".addslashes($_POST['username'])."'") or die("The username you entered was incorrect.");
$check_result = mysql_fetch_array($check);
if(sha1($_POST['password'] == $check_result['password'])) {
session_start();
$_SESSION['username'] = $_POST['username'];
header('location: member.php');
}else{
print'Your login details did not match the ones in our database. Please try again.';
}
}
require ('templates/index.html');
require ('templates/footer.html');
?>