Jump to content

[SOLVED] Populate Date for Dropdown


tapupartforpres

Recommended Posts

Hello.  Sort of a newbie here.  I have a form (that is send via email) and is not using a SQL database.  I have a drop down with month, day, and year so a salesmen can select the date he submits the form.  How to I automatically grab todays date and populate the drop down list?  Any other ideas?  Thanks!

Link to comment
https://forums.phpfreaks.com/topic/176194-solved-populate-date-for-dropdown/
Share on other sites

This is pretty vague... There are many different methods to do this, it depends on the code being used for the drop down.

 

One method is to use the date() function and set it with time() using the needed fields, ie: M d Y or however you want. Depending on your script, you may need to break the date up further for each field.

 

Hope this helps.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.