konputer
July 9th, 2004, 03:47 PM
I decided for my website that there should be an intro page, but it would only show once;
I tried writing a script at /index.php
but can't seem to get the cookies set right.
<?php
if (!isset($_COOKIE['cookie'])) {
setcookie("cookie", "yep", time() + 3600000);
}
if ($_COOKIE['cookie'] != "1")
{
$cookie_data='1';
setcookie("cookie", $cookie_data, time()+3600000);
//echo '<meta http-equiv="Refresh" content="1;url=http://www.konputer.org/intro.html">';
echo "cookie set.. ";
echo $_COOKIE['cookie'];
};
?>
(after this html begins for the main page...)
I tried writing a script at /index.php
but can't seem to get the cookies set right.
<?php
if (!isset($_COOKIE['cookie'])) {
setcookie("cookie", "yep", time() + 3600000);
}
if ($_COOKIE['cookie'] != "1")
{
$cookie_data='1';
setcookie("cookie", $cookie_data, time()+3600000);
//echo '<meta http-equiv="Refresh" content="1;url=http://www.konputer.org/intro.html">';
echo "cookie set.. ";
echo $_COOKIE['cookie'];
};
?>
(after this html begins for the main page...)