On Mon, Aug 13, 2001 at 03:06:48PM +0200, Tamas Bucsu wrote:
> hi guys,
> 
> I'd like to get the query string the browser sends to the script. The problem is 
>that since the $HTTP_POST_VARS (or $HTTP_GET_VARS ) is an associative array I can't 
>use numbers to point to the elements of this array. This piece of code does not work:
> 
> for ($a=1;$a<=sizeof($HTTP_POST_VARS);$a++){
>  echo "$a. ".$HTTP_POST_VARS[$a]."<br>";
> }
> 
> Please help
> 
> Tamas Bucsu


For the complete query-string: $HTTP_SERVER_VARS{"QUERY_STRING"}

Eg.: http://www.some-domain.com/index.php?one=xxx&two=yyy

$HTTP_SERVER_VARS{"QUERY_STRING"}: "one=xxx&two=yyy";


But you can also use:
$HTTP_GET_VARS{"one"} and $HTTP_GET_VARS{"two"}, etc:

$HTTP_GET_VARS{"one"}: "xxx";
$HTTP_GET_VARS{"two"}: "yyy";


Or you can use:
$one and $two, etc.

$one: "xxx"
$two: "yyy"

-- 

* R&zE:

-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- ««««««««««««««««««««««««

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to