Cannot modify header information?

Why do I get the error if I don’t have any header information sent?

[php]<?php
$username = $_POST[‘username’];
$password = $_POST[‘password’];
$result = ‘SELECT * FROM users WHERE username = "’.$username.’" AND password = “’.$password.’” ';
if (!$result)
echo ‘Hibás felhasználónév és/vagy jelszó.’;
else
{
setcookie(“user”, $_POST[‘username’], time()+3600);
echo 'Üdv ’ . $_POST[‘username’];
}[/php]

Maybe you already sent something before you ‘setcookie’ ?

O.

even as much as a single whitespace can cause this, it can be a real pain in the butt to troubleshoot

Sponsor our Newsletter | Privacy Policy | Terms of Service