# Create simple cookie

**URL:** <https://forum.kirupa.com/t/create-simple-cookie/243913>\
**Category:** web dev\
**Created:** [November 12, 2007, 3:54pm UTC](https://forum.kirupa.com/t/create-simple-cookie/243913 "2007-11-12T15:54:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stedem](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@stedem](https://forum.kirupa.com/u/stedem)\
**Post date:** [November 12, 2007, 3:54pm UTC](https://forum.kirupa.com/t/create-simple-cookie/243913/1 "2007-11-12T15:54:18Z")

</div>

Hello,

I’m looking for a simple way to create a cookie.

When a visitor visits the website [www.samplesite.com/index.php](http://www.samplesite.com/index.php) he needs to make a choice on the index page between “SITE A” & “SITE B”.

When he clicks on “SITE A” he needs to go auto to [www.samplesite.com/a.htm](http://www.samplesite.com/a.htm) and for B the same case.

When the visitor returns after a week he need’s to go automatically to  
[www.samplesite.com/a.htm](http://www.samplesite.com/a.htm)

Any easy way to implement?

Greetz
