Meltdown
11-27-2004, 09:12 PM
I have this code <?php
if (!empty($_GET['choice']))
{
setcookie("mozunk.com", $_GET['choice'], time()+(60*60*24*365), "/", ".mozunk.com", 1);
}
if (!empty($_COOKIE['mozunk.com']))
{
header("Location: " . $_COOKIE['mozunk.coml']);
}
else
{
/*continue with your entrance script, then use a post/url
method to set the cookie later. You can send it back to this page again*/
}
?> which I got from a friend. It's supposed to allow a user to see an alternative index page the first time he/she visits the site and then the next time he/she visits the site, he/she sees the regular index. Kindof like deviantart did for version 2. However, I can't seem to get it working right and any help would be appreciated. The alternative index is called "welcome.html" and the regular index is called "index.php" Thanks for any help :D
if (!empty($_GET['choice']))
{
setcookie("mozunk.com", $_GET['choice'], time()+(60*60*24*365), "/", ".mozunk.com", 1);
}
if (!empty($_COOKIE['mozunk.com']))
{
header("Location: " . $_COOKIE['mozunk.coml']);
}
else
{
/*continue with your entrance script, then use a post/url
method to set the cookie later. You can send it back to this page again*/
}
?> which I got from a friend. It's supposed to allow a user to see an alternative index page the first time he/she visits the site and then the next time he/she visits the site, he/she sees the regular index. Kindof like deviantart did for version 2. However, I can't seem to get it working right and any help would be appreciated. The alternative index is called "welcome.html" and the regular index is called "index.php" Thanks for any help :D