session & cookies
| From: | Radu Filip | Date: | Wed, 27 Sep 2000 13:02:56 +0000 |
| Subject: | session & cookies | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-17700@lists.php.net to get a copy of this message | ||
Hi! I have php compiles as module. And I have a site where all the php
pages must use share the same global variables, using session. I want to
transmit the session ID using cookies.
I'd like some to show me a few lines of code that do following:
- to check if it is set a cookie that contains PHPSESSID
- if it not exist, to create a session and set a cookie with the session
id
- if it exists, to "connect" the page to session using the id from cookie
I have tried seevral times to write such code but I failed.
Thx a lot in advance,
Radu Filip
--
Radu Filip
Network Administrator @CCTI | tuiasi.ro
radu@tuiasi.ro ccti@tuiasi.ro
http://socrate.tuiasi.ro/ http://www.ccti.tuiasi.ro/