Hey guys - I get this error from time to time and somewhere I usualy fix it (without knowing)
but this one will not budge.
[php]<?php
$user = $_POST['username'];
$pass = $_POST['password'];
mysql_connect("localhost", "+++++", "+++++++");
mysql_select_db("++++");
if ($_SERVER['REQUEST_METHOD'] ==
'POST')
{
if ((empty($user)) || (empty($pass))) {
print 'Please fill out your username and password to log in<br />';
}
$result = mysql_query("SELECT * FROM users WHERE username='" . $user . "' AND password='" . $pass . "'");
$number = mysql_num_rows($result);
if($number==0) {print "Your login details are not correct, please try again"; }
else { header ("Location: http://www.justoliver.co.uk/eands/html5/home.php"); }
}
mysql_close();
?>[/php]
with the error
Warning: Cannot modify header information - headers already sent by (output started
any hints? im sure its obvious…