Ok, so basically I have data I have added to an html table and a save button. I want this button to submit the data in the table to a php function so that I can modify my mysql database using the data. I have the tools to modify the database, as long as I can get the data. However, I have no clue how to do this. What is the best way to accomplish this?
Share
In Addition to what @John Conde said, for every record presented in the table, you should create it’s respective hidden field i.e. a
<input type="hidden"... />Considering that tables have rows and columns, I will make some assumptions:
Going on this assumption (let me assume 3 fields i.e. 3 columns and 2 records)
For each of these we’ll create corresponding input fields in the form we’ll create to contain the submit button like so:
On the PHP side, you could then process the form fields, like so:
Hope this helps