Eiolon Posted May 26, 2007 Share Posted May 26, 2007 Hello, I know how to insert a date by filling in a field but I don't know how to do it using a drop down menu. One menu being month, another the day and the last the year. Any code snipplets I can disect and play with or tutorials on this? Quote Link to comment https://forums.phpfreaks.com/topic/53015-solved-insert-date-using-drop-down-menus/ Share on other sites More sharing options...
pocobueno1388 Posted May 26, 2007 Share Posted May 26, 2007 Well...you just combine the form values together to make the date.... This is what the code should look like AFTER they submitted the form: <?php $month = $_POST['month']; $day = $_POST['day']; $year = $_POST['year']; $full_date = $month.'-'.$day.'-'.$year; echo $full_date; ?> Obviously this code has no input checking or anything, but it shows you the idea. Hopefully I am on the right track to what you are asking. Quote Link to comment https://forums.phpfreaks.com/topic/53015-solved-insert-date-using-drop-down-menus/#findComment-261933 Share on other sites More sharing options...
Eiolon Posted May 26, 2007 Author Share Posted May 26, 2007 Yes, that's exactly what I needed. I'll begin with that. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/53015-solved-insert-date-using-drop-down-menus/#findComment-261942 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.