> If a user inputs a date into a form, what function can I use to
validate
> that he put in a valid date?
> I want to use checkdate but that needs the date split up into day,
month
> year.
> Anyone have an easy way of doing this?

You have to specify a date format to your users, or at least assume a
certain amount of formats. If you don't do this, then there's no way to
validate it, because any amount of variations exist of date formats. 

If you require a mm/dd/yy format, then just break it apart and validate
each element. You'll basically have to write your own function, or
possibly use strtotime() to see if it returns a result. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to