Re: Converting Date Form Fields

From: Date: Fri, 16 Nov 2001 19:03:09 +0000
Subject: Re: Converting Date Form Fields
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-14411@lists.php.net to get a copy of this message
Hi Zach This is how I did it: $DateToInsert = $year ."-". $month ."-". $day ; Mike.. "Zach Curtis" <zach@populus.com> wrote in message news:NFBBIIFDLHAODMOHAEIDIEOACKAA.zach@populus.com... > I have two HTML form fields birthMonth (e.g., Jan=1, Feb=2...) and birthYear > (e.g., 2001=2001, 1999=1999...). How can take these two individual form > fields, then add in a default value of "1" for the birthDay (this is not > asked in the form), and put this data into a MySQL table field birthDate > with field type DATE (YYYY-MM-DD)? The part I do not know how to accomplish > is taking these form fields and then combining them into a date > field/format. > > Thank you. > > > Zach Curtis > POPULUS >

« previous php.db (#14411) next »