RE: [PHP] Comparing birth date with the code

From: Date: Wed, 30 Aug 2000 16:25:31 +0000
Subject: RE: [PHP] Comparing birth date with the code
Groups: php.general 
Request: Send a blank email to php-general+get-14433@lists.php.net to get a copy of this message
substr ($code, 2, 6); This will return 6 characters starting from position 2 of string $code. Some great help at: http://www.php.net/manual/function.substr.php You will need to a regex on the $birthday string to strip out any nonesential characters people might put in there... such as - or / or \ or . Tom Walsh http://www.designgeek.com > I have form > <FORM METHOD=POST ACTION="check.php3"> > Your birthday (YY-MM-DD):<INPUT TYPE="text" > NAME="birthday"><BR> > Personal code:<INPUT TYPE="text" NAME="code" > maxlength="11"><BR> > </FORM> > > the 'code' has length of 11 digits (38202124400 for example) > birthday for example can be 82-02-12. How can I check if the birthday > numbers match with numbers from the 'code' field (from the second > character from left to the fifth character from right, eg[820212])? > > Thank you in advance, > Siim Einfeldt

« previous php.general (#14433) next »