0

i am having the problem with the dynamic text fields. i am having a table which contain dynamic textfield in each row. each row can have 1 or more than one text fileds. by clicking the add link they can add those fields. now i am having the problem to get the value from textfield it should match with the row information.

expected table
        table 1
        ---------*----------*|
        ID       | Name      |
        1        | la        |
        2        | lalal     |
        3        |lala       |
        4        |lala       |
    table 2 
    ---------*----------*|
    ID       | code      |
    1        | 56        |
    1        | 66        | 
    2        | 69        |
    2        | 96        |
    3        | 89        |
    4        |  22       |

this should be done when i click submit button. but currently i am getting ID 4 for everything. how can i define the row with these fields.

k.MK28
  • 43
  • 9
  • Your queries are **highly volunerable to injections**. Take a look at [how-can-i-prevent-sql-injection-in-php](http://stackoverflow.com/questions/60174/how-can-i-prevent-sql-injection-in-php) – B001ᛦ Nov 23 '16 at 09:48
  • I would like to see what that form looks like. If there are multiple names, and each name has multiple codes, this can get tricky. And yes, take care of injection – Emmanuel Delay Nov 23 '16 at 10:43
  • admin will add the names and it will be in admin name list. that name list will display for assistant to update the code details. when he add those things name and incremental id will save in name list. that incremental will have to automatically save with code , status, remark details in table 2. codes also multiple. – k.MK28 Nov 23 '16 at 11:30

0 Answers0