Re: Check if var has a date (timestamp or regular)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, August 6, 2007 6:52 am, OOzy Pal wrote:
> How can I check an inputed date if it is a valid date and if it is in
> the form of a timestamp or regular date such as (22-07-2007 or
> 22/07/2007)

Use the cool new "filter" extension to PHP or use PCRE.
http://php.net/filter
http://php.net/pcre

There was also an article in php|architect a few months back about
having the same PCRE for PHP and Javascript client-side validation, so
that you have a consistent set of "rules" in client-side validation
(better user experience) and server-side (actual security)

ymmv

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux