Can I make an html form with array keys as the input names? I thought it was possible, but it's not working for me. I mean something like the following.
<!-- The Form -- >
<form method="post" action="<? echo $PHP_SELF; ?>">
Name: <input type="text" name="userarray[name]"><br>
Email: <input type="text" name="userarray[email]"><br>
<input type="submit">
</form>
<!-- End Form -->
Then you could access the vars with $userarray["name"] and $userarray[email]. Yes/No? Got a solution?
The reason I want to do this is that once the processing script receives the form input, I want to step through the array with a foreach loop. I need to step through approximately 30-40 form fields with this.
If this is the wrong way to do it, please let me know what you think would be better.
Thanks a lot!