Grow your CSS skills. Land your dream job.

Cookies to redirect to separate pages based on previous choice?

  • # February 25, 2013 at 2:01 pm

    Is there a way to set a cookie to redirect to a page based on a previous selection?

    I am building a site which will start with a gateway page. Option 1 will lead them to site.com/option1 and Option 2 will lead them to site.com/option2. When they return, rather than being presented with the gateway page, can I have the site take them directly to site.com/option1 OR site.com/option2 based on their previous selection?

    If this is possible, can someone direct me to a tutorial, book, etc. to learn more how to do it? Thanks!

    # February 25, 2013 at 2:35 pm

    Okay, after more searching around, I’ve found that this is definitely possible. I haven’t yet found any excellent tutorials or training material on getting started though. If anybody can point me in a great direction, I would appreciate it. Thanks!

    # February 25, 2013 at 3:21 pm

    If you use php you can use `setcookie()` and `$_COOKIE` ~ http://php.net/manual/en/features.cookies.php

    # February 25, 2013 at 6:04 pm

    @CrocoDillon Thanks for the help!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".