I'm a newbie as you can see...
First of all I'd like to say i've read some topics about cookies and "read this before you post"...
I wanna use a cookie to see if a visitor has already been to my site... if so the requirementspage doesn't need to be loaded, neither does the enter button...
this is what I had
Code: Select all
<?php
if ($_COOKIE ї'opcdvisited'])
{
$navigate = "flash.html";
$req = "white.html";
}
else
{
setcookie ("opcdvisited", "opcd", time()+3600);
$navigate = "enter.html";
$req = "req.html";
}
?>
<html>
...the server (my host) uses php 4.21 and register_globals is turned off (so does my phpversion)Notice: Undefined index: opcdvisited in d:\webroot\hosted\opcd\index.php on line 2
Warning: Cannot add header information - headers already sent by (output started at d:\webroot\hosted\opcd\index.php:2) in d:\webroot\hosted\opcd\index.php on line 9
I know everything has to be send before any html tags so... ???
what's my problem?