Re: Setting session from within iframe?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, January 28, 2008 10:37 am, Mike Yrabedra wrote:
> I have a problem that maybe someone can shed some light on.
>
> I have a page, lets say it is located here...
>
>  www.domain1.com
>
> On this page is a iframe with a src like so...
>
>  www.domain2.com/mypage.php
>
> This php page has a session _start call in it.
>
> The problem is, the session cookie is not set when the php is called
> into an
> iframe. The session_id changes each time the iframe is refreshed.

There is a timing issue here, perhaps:

If the browser has not received the cookie header for the main page,
it can't send them for the iframe.

If it doesn't send them, you can't tell it's the same user.

You'll have to have the cookie sent on a previous non-iframe page, or
have the iframed page re-direct to a non-session version when there is
no cookie, or...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux