Results 1 to 3 of 3

Thread: How to use $_GET in iframes

  1. #1
    Join Date
    Jun 2009
    Posts
    3,620

    How to use $_GET in iframes

    I am designing a web page which loads other pages using an iframe. Now I want to pass $_GET[] args to each page but I am unable to do so. I think this is because of the iframe. Am I correct? Is there any way to use $_GET in iframes?

  2. #2
    Join Date
    Nov 2008
    Posts
    1,054

    Re: How to use $_GET in iframes

    You can use $_GET in the iframe as follows. All you need to do is call this function from the main page with parameters set.

    Code:
    <iframe src="yourFrameUrl.php?name=<?php echo($_GET["name"]); ?>"></iframe>

  3. #3
    Join Date
    May 2008
    Posts
    685

    Re: How to use $_GET in iframes

    Below code is the example how you use $_GET in iframes;

    PHP Code:
    <html>
    <head> ........
    </head>
    <body>
    <iframe id="showlistings" src="your_source" width="725" height="840" name="showlistings"></iframe>
    <?php
    $the_id 
    = !empty($_GET["id"]) ? $_GET["id"] : "";
    if(!empty(
    $_GET["new"]))
    {
     echo 
    "<script>
    //Some statements
    </script>"
    ;
     }
    ?>
    </body>
    </html>

Similar Threads

  1. Will using iFrames hurts SEO
    By Weeraz in forum Software Development
    Replies: 7
    Last Post: 21-02-2012, 07:42 AM
  2. How to use $_GET Function in PHP?
    By Isaac1 in forum Software Development
    Replies: 5
    Last Post: 03-02-2010, 12:22 AM
  3. Problem of iframes
    By Hashim in forum Software Development
    Replies: 3
    Last Post: 21-11-2009, 08:19 PM
  4. Embed iframes in Flash
    By Chain-SmokeR in forum Technology & Internet
    Replies: 3
    Last Post: 13-07-2009, 11:59 AM
  5. what is the Best way to remove/replace iframes?
    By squirekat in forum Software Development
    Replies: 4
    Last Post: 25-10-2008, 05:59 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,308,219.77578 seconds with 17 queries