Forum Moderators: coopster
<input type='text' id='name' value='bob'>
<input type='text' id='name' value='steve'>
<input type='text' id='name' value='jeff'>
Is there anything in php that will allow me to access all the data that is being passed to submit.php? For example, with asp, I believe it always took the three form fields as an array and therefore I was able to access them as follows:
request.form('name[0]') // bob
request.form('name[1]') // steve
request.form('name[2]') // jeff
If I do this with php, I only seem to be able to access the last value. In my example, jeff. Does php not support same name fields or am I missing something?
Thanks in advance.
<input type='text' name='name[]' id='name' value='bob'>
<input type='text' name='name[]' id='name' value='steve'>
<input type='text' name='name[]' id='name' value='jeff'>
I don't believe it will work without using the
nameattribute.
Resource:
PHP and HTML [php.net]