EasyCFM.COM ColdFusion Forums / Tutorial Requests! / how to use a form to insert date

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: how to use a form to insert date

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

Epidemik
03-01-2011 @ 1:32 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 42
Joined: Nov 2007

how can i use a drop down menu to insert date of birth into a mysql
database?

3 drop down menus one for year month and day

thanks for any help in advanced

Webmaster
03-01-2011 @ 6:55 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4542
Joined: Jan 2002

Let's say these are your fields:

<select name="dobMonth"> ... </select>
<select name="dobDay"> ... </select>
<select name="dobYear"> ... </select>

on the action page do this:

<cfset tDateOfBirth = createDate(form.dobYear,
form.dobMonth, form.dobDay) />

Then you have a variable called "tDateOfBirth" which is
an actual date.

HTH

Pablo Varando
Senior Application Architect
EasyCFM.COM, LLC.

904.483.1457 \\ mobile
webmaster@easycfm.com \\email

\m/ (>.<) \m/
--- rock on ---

Epidemik
03-02-2011 @ 4:10 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 42
Joined: Nov 2007

i used it and posted my code in coding help, im getting a user_dob
undefined error now
Post with form code and process code

Webmaster
03-02-2011 @ 4:38 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4542
Joined: Jan 2002

Responded to your other thread.

HTH

Pablo Varando
Senior Application Architect
EasyCFM.COM, LLC.

904.483.1457 \\ mobile
webmaster@easycfm.com \\email

\m/ (>.<) \m/
--- rock on ---


Website Designed and Developed by Pablo Varando.