Tag Archives: iframe problems

Problemes With Iframe. And it’s solution

When we REFRESS web page containing IFRAME, the page reloades with the starting page. Here is the solution being in the existing page after refress. (PHP Script)

Generally what happens, when we refress a web page containing IFRAME ? The page reloades with the starting page. Information provided in the existing page are lost. this is a big problem with Iframe. Here is a way to solve this problem in php script, the can be solved in any scripting languages. See it and try ….

STEP 1: First declare a iframe in aweb page. Let the name of the web page be index.php

            <iframe src=”<?php echo $_COOKIE['pagename']; ?>” width=”738″ height=”500″ frameborder=”0″ name=”second”                 scrolling=”Yes”></iframe>

STEP 2: Now I want to load process.php page in that iFrame when I click on the submit button in index.php page.

             <?php

                     header(‘Location: process.php’);

            ?>

STEP 3:  Now insert the following code in the process.php page.

            <?php

                     ob_start();

                     setcookie(‘pagename’, ‘process.php’);

                     // Please never forget to recover the values using $_GET['']

            ?>

Now See the magic. Now press F5 To refress the page. You will see that the the Iframe will reload with the existing page.

Note : If you have got any problem with web programming then sent your message as comment with your email. Coder Circle is ready for you…