SunQuest
 
           General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old September 26th, 2002, 05:31 PM
Frederic Boije Frederic Boije is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Malmö - Sweden
Posts: 19 Frederic Boije User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post Those darn cookies dissapears!

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!!

Reply With Quote
  #2  
Old September 26th, 2002, 07:39 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
how are you setting the cookie, and is the top frame in a different folder to the main content area?

Reply With Quote
  #3  
Old September 26th, 2002, 08:54 PM
Frederic Boije Frederic Boije is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Malmö - Sweden
Posts: 19 Frederic Boije User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #4  
Old September 27th, 2002, 01:50 PM
Frederic Boije Frederic Boije is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Malmö - Sweden
Posts: 19 Frederic Boije User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Should I try to make sure the frames is loaded from within the same directory?

Reply With Quote
  #5  
Old September 27th, 2002, 08:05 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Reply With Quote
  #6  
Old September 28th, 2002, 04:42 PM
Frederic Boije Frederic Boije is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Malmö - Sweden
Posts: 19 Frederic Boije User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks a thousand Master Ben! I´ll fix, I'll fix.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Those darn cookies dissapears!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway