This post was originally written to expand on some code on a website called iwebux.com, but that website is no longer in existence. Since I am very grateful this code was was posted, I wanted to add to it by sharing how to add a second editable variable.
In this example I changed the names of the fields and made it so that the user can edit two columns for each row.
The trick to adding multiple variables (pieces of data to edit) is to add two separate ajax functions as well as two separate configuration files. If you don’t add the two configuration files then the data will not write correctly and you’ll find that the ajax function overwrites everything with whatever is stored in the database.
I”m including my sample here so that people can check it out.