save values from editable table using php

后端 未结 3 2210
攒了一身酷
攒了一身酷 2021-02-09 14:58

Hi I have a table generated from php, it is editable, I want to save edited values to database. I have no Idea how can I do this as there are many rows(dynamic) on a page. Here

3条回答
  •  臣服心动
    2021-02-09 15:32

    What you can do is ajax call to a php with the id of the row you want to save and the new data. Then use PDO to connect to the database and update the information. After that is done, use javascript to edit the table itself.

    So what you need to do is look up how to use ajax calls and use PDO. I suggest when you echo the table itself

提交回复
热议问题