I have a database with a number of tables, dbtable
.
I'm creating a form with php and I layout the form using <table>
.
Each <tr>
in the table corresponds to one row in a dbtable
.
So, the more rows in a dbtable
, the more tr-tags.. you get it.
My question is:
How should I name the input-tags to be able to use the POST-variables to update the database accordingly?
At the moment, I'm naming them 1_name, 2_name, 3_name
for one dbtable data
then 1_1_valueA, 1_1_valueB, 1_2_valueA, 1_2_valueB
for data that belongs to 1_name, 2_name etc.
But I feel this is not such a good approach..