dbdummy Posted August 29, 2007 Share Posted August 29, 2007 Hi I am creating an events manager... some of the events require the selection of multiple dates. I was planning on using a select box for the month and year, and a multiple select for the dates, but it doesn't work if the dates for the event is 'Oct 29, 30, Nov 2, 3' which is essentially how i want them displayed. i searched for multiple days, multiple dates and a calendar select script but none of them were very fruitful or sparked an idea of how to do this. Does anyone know if perhaps i am searching for the wrong term? thanks barbara Link to comment https://forums.phpfreaks.com/topic/67241-solved-selecting-multiple-dates/ Share on other sites More sharing options...
Barand Posted August 29, 2007 Share Posted August 29, 2007 How about a multiple select <?php echo "<select name='event_date' multiple size='10'>\n"; $date = mktime(0,0,0); for ($i=0; $i<90; $i++) { $d1 = date('Y-m-d', $date); $d2 = date('M d Y', $date); echo "<option value='$d1'>$d2</option>\n"; $date = strtotime('+1 days', $date); } echo "</select>\n"; ?> Link to comment https://forums.phpfreaks.com/topic/67241-solved-selecting-multiple-dates/#findComment-337410 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.