i will try to explain this the best way i can...

i am using the following code to get parameters from the url;

$var = @$_GET['tipid'] ;
$trimmed = trim($var); //trim whitespace from the stored variable
$limit=1;
// check for an empty string and display a message.
if ($trimmed == "")
{
echo "<p>Please enter a search...</p>";
exit;
}

which works fine when the script is the parent however i would like the script now to get the parameters from its parent url as the script will be inside a frame.

i have redirected to parameters to a html page with no problems but the fames containing the $_Get string are not reading parameters and returning "please enter a search..."
the reason i am doing this is because i would like to have around 5 frames reading the same parameter and only one submit button for parameter entry.

its been 4 very long night and i have researched but no results matching my criteria, im sure this shouldnt be this hard?
please help thanks in advance...

    Well one suggestion might be to update your website. Frames have been taboo (and/or strictly shunned) since like the 90's. :p

    In the meantime, you could always try duplicating the query string in the HTML across the different frames.

      Each frame is a separate HTTP request to the web server, so the main frameset page would need to include the &tpid=value in the src url for each relevant <frame> element. So the main frameset page could add it to each frame:

      <?php $tpid = (isset($_GET['tpid'])) ? '&tpid=' . $_GET['tpid'] : ''; ?>
      <frameset blah...blah...blah>
      <frame name='foo' src='/path/to/frame.php<?php echo $tpid; ?>'>
      <!-- etc. -->
      </frameset>
      

      Of course, I'm not a big fan of frames, so my real recommendation would be to use DIV's, CSS, etc. and avoid frames altogether if possible.

        yes bradgrafelman i know frames are a bit in the past but i loved the 90's!

        thank you nogdog i see what you are saying and have tried something similar but the page holding the parameter and the php frames is a html page (created in webplus x2) so where do i add the " php &tipid=value " etc to make it update the http within the frames?

        appreciate it...

          Can i not simply edit the $_GET['tipid'] code so it will get the parameter from the window/browser url rather than its own url, there is no need for the frame url to be updated providing it can take the window url?

          or is that a bit too simply for php?
          😕

            No, because web browsers don't work that way. They make a request for the frameset and then when that's loaded it makes several more entirely separate requeses, one for each frame. The server handles them all as entirely separate requests.

            There is a reason why frames are so déclassé; they have problems. This issue is the start of one of them.

              Weedpacket;10937489 wrote:

              No, because web browsers don't work that way. They make a request for the frameset and then when that's loaded it makes several more entirely separate requeses, one for each frame. The server handles them all as entirely separate requests.

              There is a reason why frames are so déclassé; they have problems. This issue is the start of one of them.

              so what is the best way to solve this without having to rewrite my wesite via java css and divs instead of frames?

                Write a Reply...