Forums

PHP

This topic is locked

Day/Month/Year Dropdown Menus - Combine & Insert

Posted 12 Apr 2005 18:48:54
1
has voted
12 Apr 2005 18:48:54 Matt Bailey posted:
Rather than tell the user to input the date in a format that would be confusing to them (MySQL YYYY-MM-DD) and also run the risk of invalid inputs, I'd like to have dropdown menus for Day, Month and Year, use PHP to combine the selected results and then input the result into my database in MySQL format. It seems like such a simple thing, but I'm not having any luck trying to figure it out.

___________________________________
* Sorry... how do you do that again?... *

Replies

Replied 12 Apr 2005 19:42:29
12 Apr 2005 19:42:29 Matt Bailey replied:
I found a solution after a couple of hours of googling... My head hurts! Here's the link for anyone else who might be interested:

www.evolt.org/article/Using_PHP_for_Date_Processing_in_Forms/20/33733/

I used the standard DW Insert Record behaviour for my other textfields and then tweaked the code to insert the formatted date as well.

___________________________________
* Sorry... how do you do that again?... *

Reply to this topic