note 71617 deleted from function.date by bobby

From: Date: Fri, 08 Dec 2006 04:16:04 +0000
Subject: note 71617 deleted from function.date by bobby
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-120420@lists.php.net to get a copy of this message
Note Submitter: proxy318 at NOSPAM dot proxy318 dot com ---- If you get a date from a form, here's a quick way to determine if the date is valid (i.e, make sure the user didn't enter February 31 or other invalid date) <? function validateDate($vmonth, $vday, $vyear){ $vtstamp = mktime(0,0,0,$vmonth,1,$vyear); $daysinmonth = date("t", $vtstamp); if ($vday <= $daysinmonth){ return TRUE; } else{ return FALSE; } } ?>

« previous php.notes (#120420) next »