Dynamic Iframe
Posted: Thu Nov 28, 2019 4:17 pm
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
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