Re: html form elements as php arrays
| From: | John Nichel | Date: | Thu, 06 May 2004 17:34:55 +0000 |
| Subject: | Re: html form elements as php arrays | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185544@lists.php.net to get a copy of this message | ||
Matthew Oatham wrote:
Hi, I am retrieving data from a database and displaying results on a html so the user can edit them, I am sending the html form back to the server as an array, i.e on my html for I might have 10 name fields so in the html code all name fields are named name[] then I can iterate through the array on the server. My problem isn't strictly php but more html / javascript. if I have a load of form field elements all named name[] how do I access them to do javascript validation? i.e document.form.name[].value doesn't work! Cheers MattPlease wrap your lines. document.form.elements['name[]'].value -- John C. Nichel KegWorks.com 716.856.9675 john@kegworks.com