note 76281 added to function.checkdate

From: Date: Mon, 09 Jul 2007 12:21:57 +0000
Subject: note 76281 added to function.checkdate
Groups: php.notes 
Request: Send a blank email to php-notes+get-128319@lists.php.net to get a copy of this message
checkData function posted below does not consider a date entered such as 03/27c/2000. The c will cause it to crash. Here is the fix. function checkData($mydate) { list($yy,$mm,$dd)=explode("-",$mydate); if (is_numeric($yy) && is_numeric($mm) && is_numeric($dd)) { return checkdate($mm,$dd,$yy); } return false; } ---- Server IP: 208.69.120.35 Probable Submitter: 207.13.235.29 ---- Manual Page -- http://www.php.net/manual/en/function.checkdate.php Edit -- https://master.php.net/note/edit/76281 Del: integrated -- https://master.php.net/note/delete/76281/integrated Del: useless -- https://master.php.net/note/delete/76281/useless Del: bad code -- https://master.php.net/note/delete/76281/bad+code Del: spam -- https://master.php.net/note/delete/76281/spam Del: non-english -- https://master.php.net/note/delete/76281/non-english Del: in docs -- https://master.php.net/note/delete/76281/in+docs Del: other reasons-- https://master.php.net/note/delete/76281 Reject -- https://master.php.net/note/reject/76281 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128319) next »