RE: [PHP] Create array from $HTTP_POST_VARS?

From: Date: Wed, 02 Aug 2000 15:40:31 +0000
Subject: RE: [PHP] Create array from $HTTP_POST_VARS?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9701@lists.php.net to get a copy of this message
Hmmmm, pardon me if I didn't understand the question here, but would the following do the job as well: <? // After a successful POST, put all variable that exist in $HTTP_POST_VARS in $myOwnVar. $myOwnVar = $HTTP_POST_VARS; // Continue using $myOwnVar... ?> Noor -----Original Message----- From: php-general-return-9697-noor=comrax.com@lists.php.net [mailto:php-general-return-9697-noor=comrax.com@lists.php.net]On Behalf Of Chris Murley Sent: eai oaeoe 02 aaaane 2000 16:17 To: axbom Cc: php-general@lists.php.net Subject: Re: [PHP] Create array from $HTTP_POST_VARS? Cerdit goes to chris b for this: untested but shoud work while( list( $key, $val ) = each( $HTTP_POST_VARS )) { $myrow[$key] = $val; } Chris On Wed, 2 Aug 2000, axbom wrote: > After receiving an input from a form using > POST, is there any way I can extract the > data from $HTTP_POST_VARS into an > array called $myrow, allowing me to access > each variable using $myrow["variablename"] > > e.g. so that > > <?php echo $myrow["name"] ?> > > outputs the same as if I would type > > <?php echo $name?> > > Thanx 4 yur time... > > .p > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#9701) next »