I need to enter UTM coordinates of certain polygons to a HTML form. I will handle the form values with php to insert into mysql db. But number of polygons and points of the polygons can be various. So text input boxes can be adjusted on the form.
+---------+------------+-----------+-------------+
| polygon | point | y | x |
+---------+------------+-----------+-------------+
| 1 | 1 | 0 | 0 |
+---------+------------+-----------+-------------+
| 1 | 2 | 0 | 50 |
+---------+------------+-----------+-------------+
| 1 | 3 | 50 | 50 |
+---------+------------+-----------+-------------+
| 1 | 4 | 50 | 0 |
+---------+------------+-----------+-------------+
| 2 | 1 | 50 | 75 |
+---------+------------+-----------+-------------+
| 2 | 2 | 50 | 100 |
+---------+------------+-----------+-------------+
| 2 | 3 | 75 | 75 |
+---------+------------+-----------+-------------+
Letting the user to enter number of points to create input boxes seems a good practice to me. However I'm not sure is the best practice to serialize values and handling the values with php ? Should I use JSON or just input names with indexes. Or something else?
Here is a simple example: http://jsfiddle.net/UVZNq/