Dynamic Iframe

Do you want to share WYSIWYG Web Builder tips, tricks, tutorials or useful HTML code? You can post it here...
(no questions or problems please, this section is not monitored by support).
Forum rules
This section is to share tips, tricks and tutorials related to WYSIWYG Web Builder.
Please do not post questions or problems here. They will not be answered.

PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
Post Reply
harvillo
 
 
Posts: 40
Joined: Thu Apr 18, 2019 8:26 pm

Dynamic Iframe

Post by harvillo »

I needed to pass along a variable to an iframe. I have a page that displays data by a search string entered (separate directory on server)

Example: query/page.php?search_string=1234

In order to pass that variable I used html at the top of page that holds the iframe
(EXAMPLE WYSI PAGE would be search.php.)

<?php
//PASS THE SEARCH VARIABLE TO IFRAME URL TOP OF THE PAGE search.php
$search_string=($_GET["query"]);
$redirect="query/page.php?search_string=$search_string";
?>

Then for the iframe target in Wysi:
<?php print("$redirect");?>

You can call the wysi page.
search.php?query="your variable here"

You can also pass dynamic keywords, titles etc to the iframe target
Post Reply