note 10153 added to Predefined variables

From: Date: Fri, 15 Dec 2000 20:57:20 +0000
Subject: note 10153 added to Predefined variables
Groups: php.notes 
Request: Send a blank email to php-notes+get-8766@lists.php.net to get a copy of this message
The $HTTP_POST_VARS environment comes in handy when trying to pass variables to an embedded Perl Script. Passing variables to an embedded Perl Script via GET / $QUERY_STRING is not the greatest as IE4/5 seems to truncate URLS longer than 2048 characters .. and passing massive amounts of data through the URL is kind of messy. The $HTTP_POST_VARS is not a string like $QUERY_STRING, it is an associative array .. therefore you must convert its contents to a sting. Heres a quick method of doing so: while(list($key, $val) = each($HTTP_POST_VARS)) { $key = stripslashes($key); $val = stripslashes($val); $key = urlencode($key); $val = urlencode($val); $postString .= "$key=$val&"; } virtual("cgi-bin/perl.pl?$postString"); http://www.php.net/manual/language.variables.predefined.php

« previous php.notes (#8766) next »