Re: [PHP] Check if var has a date (timestamp or regular)
- From: ceo@xxxxxxxxx ("Richard Lynch")
- Date: Tue, 7 Aug 2007 20:33:49 -0500 (CDT)
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?
.
- References:
- Check if var has a date (timestamp or regular)
- From: "OOzy Pal"
- Check if var has a date (timestamp or regular)
- Prev by Date: Re: [PHP] Saving
- Next by Date: Re: [PHP] Error Handling question
- Previous by thread: RE: [PHP] compose html body with variables
- Next by thread: RE: [PHP] Check if var has a date (timestamp or regular)
- Index(es):
Relevant Pages
|