A JM Posted July 17, 2009 Share Posted July 17, 2009 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, Link to comment https://forums.phpfreaks.com/topic/166265-solved-how-to-set-iframe-variable-from-recordset-item-of-parent/ Share on other sites More sharing options...
pengu Posted July 17, 2009 Share Posted July 17, 2009 I hope I'm reading your question right. Could you just put it into a $_SESSION ? Link to comment https://forums.phpfreaks.com/topic/166265-solved-how-to-set-iframe-variable-from-recordset-item-of-parent/#findComment-876810 Share on other sites More sharing options...
A JM Posted July 17, 2009 Author Share Posted July 17, 2009 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. Link to comment https://forums.phpfreaks.com/topic/166265-solved-how-to-set-iframe-variable-from-recordset-item-of-parent/#findComment-876827 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.