Jump to content

[SOLVED] Input date with html form


kevin_newbie

Recommended Posts

Hi,

 

Just a few quick questions about date and time entry using html form.

 

What are the preferred methods of entering time data into a database. Eg,

using two drop-down lists, or datetime picker. Mind you I set the date field to datetime.

 

Thanks,

 

Kevin_newbie

Link to comment
Share on other sites

It really doesn't matter how you do it. The main point is that you will have to convert whatever data you get into the proper format to go into the database.

 

Drop-down lists are nice because they don't really allow for flexibility, as the number of options are set in stone, as it were (although you should still sanitize the input in case someone plays around with your HTML before sending it to the processing script).

 

Not sure what you mean by a date-time picker though - do you mean a popup with a calendar on it? Those are nice because they are easy to use.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.