I was looking online for a script that demonstrates how I would go about making it possible for users on my site able to edit fields and such, but I could not find anything about it. So I was wondering if someone could explain to me how it works or just demonstrate with a script? To make it clear, I want users to be able to edit stuff that they’ve submitted by simply clicking ‘edit’ and pressing a button to update whatever it was they changed.
Edit: I forgot to mention that what’s been changed should update a table in a MySQL database.
You need 2 PHP files to do this. You could use a single file but the concept is easier to explain this way.
Here is a code example for the first file:
And here is an example of code for the second file where it receives the changes made by the user and updates the database.