PHP Code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
//get the post data
$post_username = $_POST["username"];
$post_pass = $_POST["pass"];
mysql_connect("-------","--------","--------");
mysql_select_db("-------");
$sql = mysql_query("SELECT * FROM users WHERE username = '$post_username'") or die("$username doesnt exist in our records");
$pass= mysql_result($sql,'0',"password");
$username = mysql_result($sql,'0',"username");
$id = mysql_result($sql,'0',"id");
if($post_username == $username && $post_password == $password)
{
echo "you are now logged in, please wait as I redirect you back to the index, click
<a href = \"index.php\">here if you arent directed</a>";
[B] setcookie("image_login","$id|$username|$pass");[/B]
}
else
{
echo" failed login, incorrect username or pass";
}
mysql_close();
?>
</body>
</html>
it gives me this error on the bolded line
Warning: Cannot modify header information - headers already sent by (output started at /home/theev2/public_html/forumresources/imagehost/login.php:8) in /home/theev2/public_html/forumresources/imagehost/login.php on line 27
what does that mean? ive done a million scripts with setcookie just like that