Sunday, 15 September 2013

post - php 5 retrieving & then passing $_POST variables -



post - php 5 retrieving & then passing $_POST variables -

i've read numerous post entries must not asking question properly. based on how i've done in past, shouldn't hard task, i'm migrating code 5.2 , used utilize register_long_arrays etc.

i'm posting long list of (400) hidden variables file, need retrieve of them , create them available under same variable names pass along step.

i realize can retrieve/pass them individually line line with

$var_a=$_post['var_a'] $var_4=$_post['var_4'] $var_z=$_post['var_z']

(but don't want write out 400 of these)

and can can loop as:

foreach ($_post $var_name => $var_val){ echo "$var_name=$var_value"; }

etc... don't want echo... want them available pass along & hanging me up. (i'm little rusty too).

foreach ($_post $var_name => $var_val){ ${$var_name} = $var_val; }

php post

No comments:

Post a Comment