Re: how to control if it is a date

From: Date: Sun, 25 Mar 2007 19:54:55 +0000
Subject: Re: how to control if it is a date
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-251340@lists.php.net to get a copy of this message
I try to use drop-down menus whenever possible for things like this; one each for days months years Then all one needs to do is check for valid dates with checkdate() Alain Roger wrote:
Hi, user can enter a string with following format dd.mm.yyyy. Application should transform it to postgresql timestamp date. however, i would like to be sure that what user typed is a real and valid date. how can i do that ? i was thinking to use date(string format, strtotime(string_entered_by_user)); but it does not ensure me that it is a valid date... thx.


« previous php.general (#251340) next »