|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
I have tried to fix a problem over a week now, and I totally give up...is cookies from hell or what???
The scenario is like this: I use a frameset (top, center, bottom) and I use cookies and mySQL to build up sessions. When the user is logged in, I want the topbar to shift from "login" to "logout". Today I have to pass a url to update the topframe. Why? You ask. Because for some unexplainable reason I CAN ONLY READ THE COOKIE FROM THE CONTENT FRAME AND NOT THE TOPFRAME... Do not ask me why!! "So - is there really a problem? You said you're updating the topframe by passing paramaters" - someone said. Yes - there is a fat big problem kicking my brains purple - when someone hits the "refresh page" everything goes barf, because the $_GET parameters is vanished. Is there any cookie wisards out there - save my planet!! |
|
#2
|
|||
|
|||
|
how are you setting the cookie, and is the top frame in a different folder to the main content area?
|
|
#3
|
|||
|
|||
|
I'm setting the cookie with:
setcookie("sess_key", $this->key, 0) or die("problems with cookie!"); And, yes - the top frame is in another folder. |
|
#4
|
|||
|
|||
|
Should I try to make sure the frames is loaded from within the same directory?
|
|
#5
|
|||
|
|||
|
your setting your cookies wrong!
it should be something like this setcookie($key, $value,$timelimit,$dir) so in your case it should look like this setcookie("sess_key", $this->key, time()+3600,"/"); This means the cookie name is sess_key, value is $this->key expires in an hour, and can be access via all dir above it |
|
#6
|
|||
|
|||
|
Thanks a thousand Master Ben!
I´ll fix, I'll fix. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Those darn cookies dissapears! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|