Re: [Phplib-users] Session/Auth Problem
Brought to you by:
nhruby,
richardarcher
From: Michael C. <mdc...@mi...> - 2002-10-09 21:04:47
|
On Wed, Oct 09, 2002 at 08:56:55AM -0400, Rob Hutton wrote: > I have auth occurring inside a iframe on my page. That works correctly and > that iframe has access to the $sess and $auth variables. The outer frame > however does not. Once I refresh it, the $GLOBALS['Site_Custom_Session'] > variable gives me the same session ID, but $auth and $sess are not defined > in the outer frame. Yes, the outer frame does a page_open (in fact, I > copied and pasted it from the inner frame just to make sure. > > Any Ideas? Yes. Don't use frames. The purpose of the iframe is to allow you to include a bit of HTML from another site over which you have no control into your current page. More specifically, they were created to allow fancier banner ads to be created, html instead of gif's. What you're doing will always cause problems. Please don't fool yourself into thinking that it's possible to do. The inner and outer frame may well load somewhat simultaneously, meaning that two different pages may open your session variables, and subsequently save them back out. It's quite possible in that case that changes to session variables may be lost. The result will be flakey behavior, such as you've described. The correct method is to simply include the code instead of using an iframe. Michael -- Michael Darrin Chaney mdc...@mi... http://www.michaelchaney.com/ |