php - Save Checkbox State and Update Database -
I am related to an idea that I want to implement in one of my projects, need help. :)
What do I have
In the first image, I have my information db and that Display the information and also edit / remove a button in which the check box must be checked even after the end of the event.
In the second image, when the checkbox is checked, the div turns green and the button (hidden) disappears.
What do I want
This is a bit difficult to understand, but I will try my best.
When a user checks the checkbox, then he will update the field with the value "1" in the DB of that version.
After that, every time I check these incidents, they should save their state (if it is done or not). If "full" field is in DB 1, then they should be treated like the second image.
Question
How can I do this?
Very good.
$. Ajax ({url: 'script_to_update_db', data: (done: 'true'}), async: false , Success: function (msg) {warning (msg);}});
Then, when the page loads, you will have to check whether the value entered in the database If this is the case, then trigger your function so that the button is removed and the Diva turn is green. How do you do this depends on the basis of your code installation. P>
Comments
Post a Comment