IFRAME and variables

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
SBukoski
Forum Contributor
Posts: 128
Joined: Wed May 21, 2003 10:39 pm
Location: Worcester, MA

IFRAME and variables

Post by SBukoski »

I have a php file, let's call it page1.php. Inside that file there is an IFRAME that references another file, called page2.php. Is there anyway to access a variable defined on page2.php from page1.php?
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Post by Jade »

I've found that if you post the variable from the main frame to the iframe you can access it that way, however I've had no success getting a variable from the page outside into the iframe. Maybe if it was a session variable or a global variable you'd have better success.
wyred
Forum Commoner
Posts: 86
Joined: Mon Dec 20, 2004 1:59 am
Location: Singapore

Post by wyred »

Second that. I also think session variables would be a better solution.
Post Reply