Ah, the join function...I see implode() will also perform the same task. That was what I needed to do.
Thanks! Zach -----Original Message----- From: matt stewart [mailto:[EMAIL PROTECTED]] Sent: Friday, November 16, 2001 9:06 AM To: 'Zach Curtis'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Converting Date Form Fields put them into an array $date_stuff[0] = $date_year; $date_stuff[1] = $date_month; $date_stuff[2] = "01"; $date_to_enter = join('-',$date_stuff); then whack $date_to_enter into your database - obviously if the input to $date_month is "Jan", you need a case statement, or something like that to make sure you change it to "01". Hope it helps ;) Matt -----Original Message----- From: Zach Curtis [mailto:[EMAIL PROTECTED]] Sent: 16 November 2001 16:02 To: [EMAIL PROTECTED] Subject: [PHP-DB] Converting Date Form Fields 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]