note 18217 added to language.variables.predefined
| From: | slandau at miticom dot com | Date: | Tue, 15 Jan 2002 01:03:34 +0000 |
| Subject: | note 18217 added to language.variables.predefined | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-24818@lists.php.net to get a copy of this message | ||
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 : )
--
http://www.php.net/manual/en/language.variables.predefined.php
http://master.php.net/manage/user-notes.php?action=edit+18217
http://master.php.net/manage/user-notes.php?action=delete+18217
http://master.php.net/manage/user-notes.php?action=reject+18217