I have a single HTML form that allows users to insert or update multiple rows in a database with a single submission. However, I don't know what the "correct" or industry standard way to match input names against certain rows is.
The way I have implemented it currently is to give each a human-readable name, followed by a delimiter (in my case an underscore _ character), followed by the row number or some other unique identifier to tie the several inputs together against one row. Then, in the processing script, I do $field = explode("_",$name) against each name, using $field[0] to get the name and $field[1] to get the unique ID.
However, in my past programming experience I have attempted to keep multiple sets of data like this discrete, instead of tying them together in a single string. I also now know that PHP accepts form names formatted as arrays and converts them into arrays automatically.
What is the industry standard method of handling this situation?