Results 1 to 2 of 2

Thread: Landing Page

  1. #1
    Join Date
    Feb 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Landing Page

    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

  2. #2
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    php. cookies plain and simple. heres how you could do it.
    add this to the information page (must have .php extension):
    PHP Code:
    <?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);
    }
    ?>
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@ /\/\@|{
    There are 10 kinds of people in the world, those that understand binary and those that don't.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •