jaruba
-
Posts
1 -
Joined
-
Last visited
Never
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
counter
in Editor Help (PhpStorm, VS Code, etc)
Posted
I am creating a sign up page where you have to fill in your demographic info and choose a certain date for a class to attend from a dropdown and then save it in a database.However, there is a max capacity for the date of the class that is picked. Ex. you would have a choice of nov 1 2004, nov 2, 2004, etc....., but when the class met capacity the database would not show the date anymore. So, i would need a counter and when it met capacity, lets say 30. it would not accept anymore.I am using a mysql database with php. is there certain code for that.
Also, not really sure how to store the dates, should i use a separate table from the student table like a classdates table. and use a date field and an id field. Then have the class date in the student table.How would i query the database to get the dates to be populated into the dropdown box.
thanks in advance.