SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Yummie cookies
-
Aug 26, 2001, 05:17 #1
- Join Date
- Aug 2001
- Location
- London, England
- Posts
- 44
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yummie cookies
I'm trying to work out how to get a cookie I made to be usable.
I've never learnt any other language before PHP do I've never really learnt sessions and cookies so I've been having a nightmare understanding them
I've got everything right it's putting the data in the database and making a server session etc...
Anyway, I need to be able to get a session id i put in a user cookie, I set the cookie up likePHP Code:setcookie("sessid", $sid, time()+43200, "/", "", 0);
I've tryed using $HTTP_COOKIE_VARS['sessid'] and it don't seem to work. I guess I gotta use session_get_cookie_params() but I don't know how to use it.
Please help before I die from stress
-
Aug 26, 2001, 06:21 #2
- Join Date
- Oct 2000
- Posts
- 430
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
If the cookie is set correctly you don't actually need to do anything to 'get the cookie back' - if you set the cookie
PHP Code:setcookie("sessid", $sid, time()+43200, "/", "", 0);
-
Aug 26, 2001, 06:33 #3
- Join Date
- Aug 2001
- Location
- London, England
- Posts
- 44
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Cheers dunno spose I'm just dumb lol.
I tryed echo $sessid; and it showed, there must be an error somewhere else in my code to why its not using it
Bookmarks