I have just done a few tests and I don't see how it is possible to have the two name= fields exactly identicle but what you can do is put arrays in the name= fields and retrieve the $_POST as a 2 dimensional array. Below is an example of what I have done.
Also you need to click the submit button for the above example to work. The above example shows about displaying what information the $_POST array holds and shows about using 2 dimensional $_POST arrays. Other than using arrays in the name= field,or changing the name of the field to be unique, you will find that only the last field of its duplicate name will be recorded in php.
Last edited by peter_budo; Nov 27th, 2008 at 7:51 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
I have two input textbox with the same name, when submiting the page I get only the value of the second textbox.
how can i get the value of both fields???
i think same name textbox have to display there value.i tried some code [php].they are executing well.if u have still proble... then use id for controls.below code working good.............
Last edited by peter_budo; Nov 27th, 2008 at 7:54 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.