how to limit same date in database using php [on hold]

Saturday, October 17, 2015

i have a form and a single input type=date. whenever i will submit it will save the date inside my table in column date_Use, i want to display an alert if that column contains 3 same date and that date will not be available to be selected. after that, when that date ends it will put a string "yes" into another column named finished. how will i going to do this i have searched the web and i found some pieces of codes about using count but i have no idea in limiting it in 3 same dates.

for example: i will submit a date 2015-01-01 three times, the fourth time i will submit the same date will notify me that it has reached its limit of 3 same dates and that date will not be available. so i will have to choose other date. and then when 2015-01-01 ends the column finsihed will be updated from no to yes.

any ideas? thanks in advance.


Filed under: php

0 comments:

Post a Comment