I am attempting to assist someone in the development of their PHP-based webpage (although I know little about PHP my self). We are having a problem when it comes to using Frames and Sessions together in PHP. I have heard people suggest using tables instead of frames, but if this is so, how can you implement a navigation menu using only tables?
But to the problem...
There is a login page that directs the user to FrameSet.php (a frameset of 2 frames, each frame using a different page of course) page when he successfully logs in (and a session begins).
From there, the user may click on a link in the left frame(navigation) page, and it then loads that page into the right(content) page.
The session ID needs to be continued throughout all the pages, no matter where the user goes, but we are having trouble with this.
We have included the following code in ALL pages, including the FrameSet.php, the default pages for both frames, as well as the page that is loaded in the right(content) frame when the user clicks the link in the left(navigation) frame/page:
Code: Select all
session_start();
$id = $_SESSION['username'];
print ($id);However, when we have the Login page direct to a non-frame page, the session is accurately continued, and continues to be continued as we go through links from that non-frame page to other non-frame pages.
Somehow the session ID is being lost when using frames, but we don't understand why since we have the session code in ALL pages.
Any suggestions/ideas?