If the user submits the page and that date is wrong then dont save the data,
check the data serverside. if you want the date checked before the client
presses submit, your looking at doing somehting client side, javascript. php
is server side only, just check the data to see if it is valid at the
server, if it isnt, just send the user back with a nasty message and tell
them to smarten up :)

if ( time() > mktime(1, 1, 1, $month, $day, $year) )
    echo "Bad !!";
    echo "Good, now I'll save the data";


  Chris Lee

"Kristjan Kanarik" <[EMAIL PROTECTED]> wrote in message
Good afternoon,

I'm looking for a function which enables me to allow user only to enter
those dates which are still to come. In my head I have three <select>
things... one for day, one for month and one for year. In order to prevent
the user from submitting the form with the date which is in past, I need
probably Javascript. Am I correct?

I rather prefer to keep my site Javascript free and therefore it would be
great if somebody has already written such a function and would be ready to
share it with me/others. If not, any ideas how to start... ????

TIA & happy coding,
Kristjan Kanarik

P.S. Please put [EMAIL PROTECTED] to CC: line since I'm only on the digest.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to