Varma69 Posted February 9, 2007 Share Posted February 9, 2007 Hi Guys I am have registration form with the date of birth field as a single text box but some user were not entering the format of the date of birth correctly. I decided to change from a single text bow to three drop down menu. What I would like to know is it possible to get these three values to be inserted into the database as one value. eg 1982/12/30 If it is can some one help me with it. Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 9, 2007 Share Posted February 9, 2007 $birthdate = $year.'/'.$month.'/'.$day; To help any more we'd need to see CODE. Quote Link to comment Share on other sites More sharing options...
Varma69 Posted February 9, 2007 Author Share Posted February 9, 2007 ok thanks i will try it if i need any more help i will send the code. BTW do you know any good tutorials in to validate the field so when some one choose the month the correct number of days shows up in the Day drop down menu. Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 9, 2007 Share Posted February 9, 2007 You could use ajax to do that, or just use checkdate() on the date created to make sure it's valid. Quote Link to comment Share on other sites More sharing options...
Varma69 Posted February 9, 2007 Author Share Posted February 9, 2007 is there a javascript i can use Quote Link to comment Share on other sites More sharing options...
Varma69 Posted February 9, 2007 Author Share Posted February 9, 2007 thanks the php worked thanks a million. Still working on the validation for it Quote Link to comment 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.