finster Posted January 28, 2010 Share Posted January 28, 2010 Hi, Could you point me in the right direction. I am putting together a html form which submits data to a mysql db via a php script. The user will enter a date in one of the fields but I need the date to be entered in a consistent format. For test purposes I simply have it as a text input field but I'd like the user to be able to select the date using point and click to eliminate the risk of error but I'm guessing this is going to be pretty complicated to achieve. Does anyone have any recommendations or know of any third party scripts that I could plug in? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/190138-entering-a-date-into-a-mysql-db-from-form/ Share on other sites More sharing options...
jskywalker Posted January 28, 2010 Share Posted January 28, 2010 http://lmgtfy.com/?q=entering+a+valid+date+on+a+web+form+with+validation Quote Link to comment https://forums.phpfreaks.com/topic/190138-entering-a-date-into-a-mysql-db-from-form/#findComment-1003213 Share on other sites More sharing options...
PFMaBiSmAd Posted January 28, 2010 Share Posted January 28, 2010 There are a number of existing date picker scripts - http://www.dynamicdrive.com/dynamicindex7/index.html You will still need to validate and possibly reformat the entered date in your php form processing code. Quote Link to comment https://forums.phpfreaks.com/topic/190138-entering-a-date-into-a-mysql-db-from-form/#findComment-1003216 Share on other sites More sharing options...
finster Posted January 28, 2010 Author Share Posted January 28, 2010 Thanks for the help! Quote Link to comment https://forums.phpfreaks.com/topic/190138-entering-a-date-into-a-mysql-db-from-form/#findComment-1003238 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.