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
https://forums.phpfreaks.com/topic/52724-passing-variable-through-iframes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.