I manage my office's website on the side in addition to my normal non-computer duties.
I have built a simple set of forms and a MySQL database to help our training manager do class registrations, etc. online. Essentially there is an HTML form that posts to a PHP script that dumps the registration info into the database.
One feature of the training is that some classes have a complimentary bevarage and others do not. I need a way to display the beverage option for some courses and not display it for others.
Currently there is a drop down box of all the classes you can sign up for, that is populated from the database of classes that are added/admin'd on the back end.
I figure I will add a field beverage? Yes/No so that there is some variable to call to determine if the beverage choice should be displayed on the signup form or not.
My big problem is I don't know how to go about coding the form appropriately.
I've never used Java and I'm really just a PHP novice. Obviously right now with the HTML form there's no way for the server to know which class has been selected. So for the drink option to be displayed it would need to be able to (without submitting the form) look up that class in the database, see if beverage is set to yes or no, and then display the drink option.
Anybody have any suggestions for how to go about this? Where to get started?