Jump to content

[SOLVED] How to set Iframe variable from recordset item of parent?


A JM

Recommended Posts

I have an Iframe variable that I want to be set from a recordset populating my parent form and am having a problem with this.

 

The parent form uses the following as a label:

<?php echo htmlentities($row_rstocdetail['formnumber'], ENT_COMPAT, 'utf-8'); ?>

 

I want my Iframe to be able to use the same information but I cant seem to get the variable to pass. Since the form on the parent is not submitted I can't use $_POST so I'm at a bit of a loss... this has to be easy I'm just missing something obvious here.

 

Any help would be appreciated.

 

Thanks.

 

A JM,

I'm still pretty new to the game... how would you go about using it?

 

On the parent

 

if (!isset($_SESSION)) {
  session_start();
}

$_SESSION['myvar']='123456';

 

 

Then can I simply use the variable on the Iframe?

 

echo "Our color value is ".$_SESSION['myvar'];

 

What happens if the user uses the back button, etc? do I need to worry about clearing the $_SESSION?

 

Thanks.

 

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.