RE: [PHP] updating sub-request parameters

From: Date: Tue, 02 Nov 2010 22:57:16 +0000
Subject: RE: [PHP] updating sub-request parameters
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-309257@lists.php.net to get a copy of this message
So let me get this straight. Your script.php has all the passed variable positions of $_GET? Once it has passed you want to change the value? You can change the value of a $_GET very easy. If(isset($_GET['param1'])) { $_GET['param1'] == "no Chew"; } By changing the global value or using filters on the global values of $_GET. I have created a similar script only to mess with the $_GET variables. If(isset($_GET['param1'])) { $_GET['param1'] = mysql_real_escape_string($_GET['param1']); // you can create $_GET variables like so. $_GET['moo_cow'] = mysql_real_escape_string($_GET['param1']); } I hope I have answered your question. Richard L. Buskirk -----Original Message----- From: Daniela Floroiu [mailto:dani.floroiu@googlemail.com] Sent: Monday, November 01, 2010 10:21 AM To: php-general@lists.php.net Subject: [PHP] updating sub-request parameters hi, I need to make an apache sub-request like: virtual('.../script.php?param1=val1&param2=val2...'); where the parameters are different from the parameters of the original request. I tried to set param1 and param2 in $_GET, $_REQUEST, $_SERVER['QUERY_STRING'] but without success: what script.php receives are nothing less and nothing more than the original parameters with the original values. any ideea how one could touch the parameters being passed to a sub-request? cheers, --df

« previous php.general (#309257) next »