I have a form with multiple textboxes which are created dynamically, now all these textboxes are of same name lets say txt, now is there any way that when form processing happens we could read all the text boxes values using $_POST method, which are of so called same name. If possible how?
I have a form with multiple textboxes which are created dynamically, now all these
Share
You have to name your textboxes
txt[]so PHP creates a numerically indexed array for you:Otherwise the last textbox’ value will overwrite all other values!
You could also create associative arrays:
But then you have to take care of the names yourself instead of letting PHP doing it.