Jump to content

passing variable through Iframes?


spires

Recommended Posts

Hi

 

I'm new to Iframes and am having trouble passing PHP

varables from outside the Iframe to inside the Iframe.

 

this is what i'm trying at the moment:

main page

<iframe src="listings_text.php?time_frame=this" NAME="ishort" width="385" height="290"> </iframe>

 

 

I was thinking it would be something like this, but this is not working.

<?php
$time_frame = 'this';
?>
<iframe src="<?php echo 'listings_text.php?time_frame='.$time_frame.''; ?>" NAME="ishort" width="385" height="290"> </iframe>

 

 

This is the page that the Iframe links to, This is where i'm trying to get the variable.

<?php
$time_frame = $_GET['time_frame'];
echo $time_frame;
?>

 

 

I hope this makes sence,

Thank you for helping.

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.