need a script which set cookies

Links for php scripts

Moderators: macek, egami, gesf

User avatar
sean_82
New php-forum User
New php-forum User
Posts: 6
Joined: Fri Apr 16, 2004 4:04 am
Contact:

need a script which set cookies

Postby sean_82 » Wed Nov 24, 2004 3:16 pm

hi
i look for a script that makes a link on an introducing page and by clicking the link cookies are set for this user and when he visits this page again he will be redirected to other url,
so he doesnt need always to visit this page
thx for help

User avatar
bezmond
Moderator
Moderator
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK
Contact:

Postby bezmond » Sat Nov 27, 2004 7:53 am

see http://www.php.net/setcookie - this will give you much information.

A step-by-step of what you need to do;

1. A page that set's a cookie saying that the intro has been viewed (the one that you are linking to).
2. An index.php (or similar) that reads the previously set cookie.
3. A page to load if the cookie exists.

Andrew


Return to “PHP Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest