2 iframes loading the same local php file but only 1 works
Posted: Wed Mar 21, 2012 11:01 am
My Test Setup
site.com/admin/index.php is a login form that posts to /admin/login.php which then redirects to start.php if the login details were correct.
site.com/admin/iframetest.php contains 2 iframe tags. Both iframes pull /admin/iframecontent.php
My Problem
For some reason when I first log in and immediately go to iframetest.php, the first iframe shows iframecontent.php properly and the second iframe shows either start.php (as if I had just logged in) or index.php (as if I had been logged out and booted to the login form again).
Any idea what would cause this?
Any tips on how I could track down the cause? I had considered maybe I could add some kind of logging function to my config.php which is included at the top of all files in the test setup but not sure what I should be looking for.
Update
* I've made all the pages show me the session ID so when the wrong page loads in the 2nd iframe I can see if maybe it's using a different session id. It is not. All files report the same session ID. So now I'm thinking there's something wrong with me logic for checking if a person should be logged in or not.
* It's not always that iframe 1 works and iframe 2 doesn't. Sometimes it's the other way around.
site.com/admin/index.php is a login form that posts to /admin/login.php which then redirects to start.php if the login details were correct.
site.com/admin/iframetest.php contains 2 iframe tags. Both iframes pull /admin/iframecontent.php
My Problem
For some reason when I first log in and immediately go to iframetest.php, the first iframe shows iframecontent.php properly and the second iframe shows either start.php (as if I had just logged in) or index.php (as if I had been logged out and booted to the login form again).
Any idea what would cause this?
Any tips on how I could track down the cause? I had considered maybe I could add some kind of logging function to my config.php which is included at the top of all files in the test setup but not sure what I should be looking for.
Update
* I've made all the pages show me the session ID so when the wrong page loads in the 2nd iframe I can see if maybe it's using a different session id. It is not. All files report the same session ID. So now I'm thinking there's something wrong with me logic for checking if a person should be logged in or not.
* It's not always that iframe 1 works and iframe 2 doesn't. Sometimes it's the other way around.