Skip to content
Advertisement

How to create a simple form on my website (cPanel based) that only activates during certain periods?

I have a weekly conference and I would like to log which participants are attending. I have a website I own I would like them to go to, then put in their name and click “Enter“. Afterwards, I’d like for it to save into a database on my website. I currently have cPanel behind my website.

I would like the form to ONLY activate, say, on Thursdays from 10 am to 12 pm. After that, I would like it to close up and not allow entires.

Is there a simple way to do this time exclusion and sample scripts I can find online? Thank you!

Advertisement

Answer

PHP date function would work well for this.

JavaScript

Keep in mind that date() returns a string value that is given from timestamp()

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement