RE: [PHP] Sessions and iframes (or frames)?
| From: | John W. Holmes | Date: | Sun, 30 Mar 2003 18:44:53 +0000 |
| Subject: | RE: [PHP] Sessions and iframes (or frames)? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-141645@lists.php.net to get a copy of this message | ||
> I built this site using using different iframes: one for a login,
other
> for
> a forum, another for a voting poll, etc...
>
> I was wondering what is the best way to ensure that you could only
post a
> topic in the forum, or vote if you had already logged in.
>
> I'm somewhat familiar with the $_session global variable, but only if
the
> code happens in the same page. How can you check, from another frame,
that
> user is logged?
That "other frame" would have to refresh and check the $_SESSION just
like any other page. Each frame is it's own request, so in order for a
frame to do anything with PHP, it will need to be refreshed or something
requested within the frame.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/