Hi All

Hope you could help with this. I wish to have a single frameset page where I could be able to dynamically change the source for one of the frames. I could send the URL source for the frame using a query string. I know ASP but am new to PHP..

Thanks,
Sam

    I don't really understand what you're trying to do.

    You want to have a php script that gets a url from the query string, and then outputs a frameset page with that URL as the source of one of the frames?

      (You emailed me: "You are right with that. I'm to use the URL from the querystring and set it as the source for one of the frames within a frameset.")

      Ok, that's easy enough. The php page should look like this:

      <?php

      if (isset($GET['url']))
      $url = urldecode($
      GET['url']);
      else
      $url = "defaultpage.php";

      ?>
      .
      .
      .
      <frameset>
      <frame src="thispage.php">
      <frame src="<?=$url?>">
      </frameset>

      Then, assuming that page is called index.php, if the user goes to "index.php?url=mypage123.php" then the second frame will contain mypage123.php. If no page is specified in the query string, then the frame will contain defaultpage.php.

      Hope that helps!

        Write a Reply...