can anybody help me out with this? I have figured out checkdate finally,
but still have nothing that will help me with time validation.
thanks,
Jeff
Domintcom [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have a form that is passing a date variable, and a time variable. I
will
On Tuesday 25 March 2003 00:39, DomIntCom wrote:
can anybody help me out with this? I have figured out checkdate finally,
but still have nothing that will help me with time validation.
explode() on the time delimiter (probably colon)
check that hour is 1-12 (or 0-23)
check that minute is 0-59
Try this (as found on php.net)
$str = 'Not Good';
if (($timestamp = strtotime($str)) === -1) {
echo The string ($str) is bogus;
} else {
echo $str == . date('l dS of F Y h:i:s A',$timestamp);
}
Erwin Kerk
Web Developer @ BliXem.nl
Jason Wong wrote:
On Tuesday 25 March 2003 00:39,
thanks Erwin Jason... I will work with these two, and see what I can come
up with.
Erwin Kerk [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Try this (as found on php.net)
$str = 'Not Good';
if (($timestamp = strtotime($str)) === -1) {
echo The string ($str) is bogus;
}
here is my solution for this...
if (($timestamp = strtotime($_POST['sdate'])) === -1)
die (H3The start date is not a valid date format/H3);
if (($timestamp = strtotime($_POST['edate'])) === -1)
die (H3The end date is not a valid date format/H3);
if (($timestamp =
5 matches
Mail list logo