Fetching the values from previous page
| From: | Batara Kesuma | Date: | Mon, 25 Feb 2002 17:48:14 +0000 |
| Subject: | Fetching the values from previous page | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-86125@lists.php.net to get a copy of this message | ||
Hi all,
I have a page that post a lot of variables to the next page. It looks
like:
<form action=next_page.php>
<input type=text name=f_text1>
<input type=text name=f_text2>
<select name=f_multiple1[] multiple size=6>
<option value=1>one
<option value=2>two
<option value=3>three
</select>
<input type=submit>
</form>
On next.php I can access all the values through: $f_text1, $f_text2, and
an array $f_multiple1. My question is, how can I pack all of these
variables from previous page _without_knowing_ the variables name? I mean,
I know I can write:
$array = array("text1" => $f_text1, "text2" => $f_text2,
"multiple1" =>
array($multiple1));
But that is not what I want, it is more like:
GetAllFromPrevious();
or in Perl:
%params = $q->Vars;
And poof, all the values from previous will be inserted into an array.
Thanks,
--bk