note 18217 deleted from language.variables.predefined by curt
| From: | curt@php.net | Date: | Tue, 06 Jul 2004 02:54:05 +0000 |
| Subject: | note 18217 deleted from language.variables.predefined by curt | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72655@lists.php.net to get a copy of this message | ||
Note Submitter: slandau@miticom.com
----
Having a problem with accessing posted information where form field names are duplicated?
First off, you must rename these fields by appending [] to the ending of the name. Then you can
access the values by enumerating through the resulting array.
Example:
<input name="my_field[]">
<input name="my_field[]">
<input name="my_field[]">
<input name="my_field[]">
Access these as $my_field[i] or $HTTP_POST_VARS["my_field"][i] where i is an integer
between 0 and 3.
Hope this helps restore your sanity : )