Posted by ChronoFish on 10/31/08 11:32
"...So there's no better way to get the string when using post other
than
compiling it yourself?..."
What do you mean "compile it yourself". You get the QUERY_STRING - but
it happens to be blank - that's just the nature of a POST. It's not
inconveivable that your Form's "action" looks like this:
"http://somehost.com/form_handler?sentby=page1&remotesite=true"
Here your $_GET array would be comprised of:
$_GET['sentby']='page1'
$_GET['remotesite']='true'
Your Query String would be "sentby=page1&remotesite=true" and the
$_POST array would hold the contents of the form vars.
It would be pretty easy to "compile" a post's query string:
foreach ($_POST as $a => $v)
$postQueryString.= ($postQueryString=="" ? "" : "&" ) ."$a=$v";
Not sure why you'd want to do this, but there it is. BTW, the value of
QUERY_STRING is set by your web server - PHP just gives you access to
it.
-CF
Navigation:
[Reply to this message]
|