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? 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. 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! 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
Archived
This topic is now archived and is closed to further replies.