Why Arrays in Forms? ( Was "Accessing variables from a form" )
| From: | Brian White | Date: | Wed, 21 Feb 2001 21:36:16 +0000 |
| Subject: | Why Arrays in Forms? ( Was "Accessing variables from a form" ) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-41062@lists.php.net to get a copy of this message | ||
Why do you have to specify multi-value fields in HTML
forms specifically as PHP arrays?
It seems incompatible with other CGI languages, and
could make it difficlt to chop and change CGI engines in
the background.
At 19:08 21/02/2001 +0200, Pavel Jartsev wrote:
If you create your fields like this: <? ... echo '<input type="text" name="name['.$rownum.']">'; echo '<input type="text" name="phone['.$rownum.']">'; echo '<input type="text" name="fax['.$rownum.']">'; ... ?>Regs Brian White ------------------------- Brian White Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy Phone: +612-93197901 Web: http://www.steptwo.com.au/ Email: bwhite@steptwo.com.au