Frames and session handling

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rivolinho
Forum Newbie
Posts: 3
Joined: Tue Apr 12, 2005 9:42 am

Frames and session handling

Post by rivolinho »

Hi,

My homepage is made up of afew frames, a banner, a frame on the left containing links to navigate the site and a content frame in the center where everything is targeted to.

My problem is i cant recall session variables values to a form on the content frame. The user logs in in the left frame and the session is started. Php echos on this frame display the correct username, however all echos to pages in the content frame display nothing.

Do i need to pass values from one page to another for this to work?
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

well remember that frames are all separate web pages themselves. You can use $_SESSION[] vars on your content frame, but you're goign to need to make sure you have your session start stuff included in that page. You will also need to reload the page after you log in on the left frame to get all of your session vars from the server. You can do taht with something like:

Code: Select all

top.contentFrame.reload();
as an alternative, if you want to just pass vars from one frame to another, that's an option with js and might be a good one if you don't want to reload the frame and you're not dealing with sensitive information.

Burr
Post Reply