Hi -
I have a PHP msg board on one domain, and a site on another, the idea is
that the board is framed. The PHP msg board pages detect whether they're in
the frameset, and if not, pass their URL & query string over to the
frameset. The frameset then grabs this and writes a frame src tag, thus
enclosing any msg board page within the right frameset even if opened
outside it.

The problem is that the $QUERY_STRING is inconsistent. On it's own domain, a
test page works fine. But when the test page uses the framing mechanism, the
$QUERY_STRING only picks up the first argument - it ignores any subsequent
ones. I've got these two variations here:

http://www.alleykat.co.uk/t1.php?arg1=aaa&arg2=bbb&arg3=ccc
This one works fine and grags all the args. It doesn't try to send to the
frameset.

http://www.alleykat.co.uk/t2.php?arg1=aaa&arg2=bbb&arg3=ccc
This one sends to the frameset, and gets only the first argument.

The code in these pages is below. The only difference in the two is that the
javascript line is uncommented in t2.php, so it sends to the frameset:-
<?php
$thisURL = $REQUEST_URI ;
$thisPage = $PHP_SELF;
// Try a few ways of grabbing the query string
$qs = $QUERY_STRING;
$qqs = $_SERVER["QUERY_STRING"];
$qqqs = $HTTP_SERVER_VARS['QUERY_STRING'];
$gotoURL = "http://www.alleykat.co.uk"; . $thisPage . $qs;
?>
<script language="Javascript" type="text/javascript"><!--
    // uncomment line below to send to frameset
    //if (top.frames.length == 0) { window.location.href =
"http://www.virtualmagrep.com/vmr_forums.asp?u=<?php print($gotoURL);?>"; }
//-->
</script>

<?php
print($thisPage) . "  - php_self <br>";
print($qs) . " - query_string <br>";
print($qqs) . " - second query_string <br>";
print($qqqs) . " - third query_string <br><hr>";
print($gotoURL) . "  - the built url <br>";
print("<hr>");
phpinfo();
?>

Not sure if this is a bug or if I'm doing something wrong.
Cheers -
Andy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to