Question:
How do you make PHP Sessions work accross iframes, frames, etc.?
Vertical
2007-03-02 17:18:52 UTC
I have a login system which opens a new window when you login. It works fine, and has for years. I want to change it so that instead of opening a new window it will log the user into the current window, and create the user options down the sidebar. This works. The problem is when I link the user options (on the sidebar) to an iframe (called mainbody) on the page, the pages loaded in the iframe do not recognize the PHP session. How do I make these pages that load in the iframe on the main page recognize the session that the main page already recognizes. (Also note that if you open the control panel in a new window, and click a link on the main page (associated with the login session) it will log you out of the new window and log you into the main page. Both of these should be the same session, and niether should log you out of the other one (Even though I will be getting rid of the new window control panel entirely soon) Hopefully this isn't too complicated. Thanks in advance!
Three answers:
~ ! BabyGirl ! ~
2007-03-02 20:31:23 UTC
http://www.babydev.com



You can find help with PHP there...
Atif Majid
2007-03-04 00:36:37 UTC
Session are stored on the server. As far as the page being loaded in the iframe/frame is also on the same server/domain, session data is available in that page. You just need to add session_start(); on top of that page and it should work. If it is not working, then this must be some other problem.
carstensen
2016-10-17 14:00:18 UTC
extreme answer. comic Dick Gregory once tried to assist a guy who weighed round seven hundred lbs (perhaps extra, there have been no truck scales accessible.) because of his weight the overweight guy replaced into bedridden and had his nutrition further to him. He purely had six bowel moves a year. He must have evacuated his waste right into a 50 gallon barrel anytime. each load must have weighed a minimum of 20 to 30 lbs anytime. The poundage is impressive. purely whales and elephants come close.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...