Hi, I am making a terms of agreement page.
The code I am using is:
<?php
if(isset($_POST['submit']) or isset($_COOKIE['terms'])){
setcookie('terms', 'agree', time()+10000000, '/', '', 0);
header('Location: http://'.$_SERVER['HTTP_HOST'].'/');
}else{
echo <<<END
<form action="http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}" method="post">
Click to accept terms:
<input type="submit" name="submit" value="I accept them">
</form>
END;}
?>
And I get the error.
Thanks guys!