I'm working on a project where I have created a form that will submit data to custom database table, using the method I learned from bob's guide here:
http://bobsguides.com/custom-db-tables.html.
However I'm looking to do one additional thing with my form which is to have a number submitted from the form, and then I would like my snippet to query the database for a particular integer field, then subtract the number that was submitted from the form, from the field in the database, and finally update the field with the result.
so for example
database field = total hours
total hours = 20
form field = hours taken
hours taken = 5
submit form -> total hours - hours taken = 15
new total hours = 15
I'm just beginning to learn php, so any guidance would be appreciated.