Log in

View Full Version : Landing Page



twoanalytic
02-19-2008, 06:02 PM
I am trying to develop a web site that has an initial landing page where I can collect some information from the user and then direct them to another page. If the user has alread been to this landing page then I want to redirect them to another page.

Does anyone know if this can be done using a cookie of some easy way?

Thanks

Master_script_maker
02-19-2008, 10:08 PM
php. cookies plain and simple. heres how you could do it.
add this to the information page (must have .php extension):

<?php
$domain="http://www.yourdomainhere.com"; //your domain
$years=1; //years to remember
if(isset($_COOKIE[$domain])) {
header("Location: http://www.yourdomainhere.com/anotherpage.php"); //or anotherpage.html
} else {
setcookie($domain, "Visited", time()+(3600*24*30*12*$years);
}
?>