Hey guys,
I just need a bit of help figuring out what the best way to go about the following using PHP/MySQL:
It's basically a registration component
So I have a button, let's call it "add_to_list" and I need this button to control a couple of things. When a user clicks the "add_to_list" button it will check to see if that user has done so before, if not it will add that user to an "attending" field in the DB and it will subtract 1 from a field in a db called "spots_left" (let's say there is 10 spots). Once the "spots_left" field hits 0 the "add_to_list" button will no longer.
How would this be done? New to PHP and any help would be greatly appreciated : )
Thanks