need a script which set cookies

Fragen zu allen Themen rund ums Programmieren außerhalb von phpBB können hier gestellt werden - auch zu anderen Programmiersprachen oder Software wie Webservern und Editoren.
Antworten
afriend
Mitglied
Beiträge: 1
Registriert: 25.11.2004 00:21

need a script which set cookies

Beitrag von afriend »

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
Benutzeravatar
MrMind
Mitglied
Beiträge: 464
Registriert: 29.11.2003 17:14
Wohnort: Darmstadt/Odw
Kontaktdaten:

Beitrag von MrMind »

The user on your page are registered user from phpBB on your site??? Or use you other registerdata on your page??

When you use the registerdata from phpBB then can you save the data in the database and when the user come on your page then read this data from the database and send with:

Code: Alles auswählen

Header("Location:". $page_from_db.");
to the browser, then come the user to the last visited page.

This is better else when you use cookie, while when the user deactive cookies in this browser, then cannot send any cookies to the pc from the user.



MrMind
Selbst ist der Coder
Coder unter Linux
Benutzeravatar
DaniM
Mitglied
Beiträge: 687
Registriert: 28.04.2003 19:22
Wohnort: Ulm
Kontaktdaten:

Beitrag von DaniM »

MrMind hat geschrieben:The user on your page are registered user from phpBB on your site??? Or use you other registerdata on your page??

When you use the registerdata from phpBB then can you save the data in the database and when the user come on your page then read this data from the database and send with:

Code: Alles auswählen

Header("Location:". $page_from_db.");
to the browser, then come the user to the last visited page.

This is better else when you use cookie, while when the user deactive cookies in this browser, then cannot send any cookies to the pc from the user.



MrMind
But you can also send a cookie to the pc of the users, 'cause most of them accept cookies.
So far, you can save the information in a database and as a cookie.

Greets,
Dani
Ihr wohnt im Süd-Westen Deutschlands?
|- Nehmt an der Schwäbischen phpBB Usergroup teil!
Antworten

Zurück zu „Coding & Technik“