Hello, all. I am needing a little bit of help.
I would like to have a form that only accepts future dates, not current or past dates. I'm basically a PHP n00b, so I'm hoping someone can help me out.
Thanks.
Want form to accept future dates only
Started by
Corky1217
, Apr 14 2011 01:59 PM
5 replies to this topic
#1
Posted 14 April 2011 - 01:59 PM
#3
Posted 14 April 2011 - 09:19 PM
I appreciate your reply, but can you go into a bit more detail?
#4
Posted 14 April 2011 - 10:53 PM
Do you already know how to handle posts in php? If not you should read: Variables From External Sources.
Also make sure you read the links i provided. Php.net is the best documentation site you'll ever find because it also provides some very useful examples with the doc.
Also make sure you read the links i provided. Php.net is the best documentation site you'll ever find because it also provides some very useful examples with the doc.
#5
Posted 16 April 2011 - 06:41 AM
True that! What rc69's method does is it creates two (very large) numbers of seconds that have passed since the Unix epoch. It's kind of a clock, but a lot simpler because there's no oddities like 3600 seconds in an hour. You would calculate the amount of seconds up till the to-be-checked date, and compare it with the amount of seconds till now. If the first number is larger than the other one, you know the first date is in the future.
#6
Posted 16 April 2011 - 11:38 AM
I am trying to figure out what exactly it is he means? He wants a form to accept future dates? I suggest reading what rc69 posted, and learn the two php functions he submitted as well.. Can you give a bit more detail as to what exactly this form is going to do?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users