Populate menu grouping results
Posted: Thu Sep 29, 2005 10:00 am
Hello !
I have a drop down menu populated from a MySQL results.
Right now it shows the date of the day that can be choosen. So the date appear if it is in the database.
now i'd like to have a drop down menu, not the same one, but in another page.
This will show the week to choose and when submitted will send values to a query...
I mean, right now i did it manually like this :
can i build the same, but dinamically from the Database? right now i should add every monday the menu items for the week before...
thanks all...
I have a drop down menu populated from a MySQL results.
Right now it shows the date of the day that can be choosen. So the date appear if it is in the database.
now i'd like to have a drop down menu, not the same one, but in another page.
This will show the week to choose and when submitted will send values to a query...
I mean, right now i did it manually like this :
Code: Select all
<select name="period">
<option value="`theDate` >= '2005-08-01' AND `theDate` <= '2005-08-05'">01 - 05 aug 2005</option>
<option value="`theDate` >= '2005-08-08' AND `theDate` <= '2005-08-12'">08 - 12 aug 2005</option>
<option value="`theDate` >= '2005-08-15' AND `theDate` <= '2005-08-19'">15 - 19 aug 2005</option>
<option value="`theDate` >= '2005-08-22' AND `theDate` <= '2005-08-26'">22 - 26 aug 2005</option>
<option value="`theDate` >= '2005-08-29' AND `theDate` <= '2005-09-02'">29 aug - 02 sept 2005</option>
<option value="`theDate` >= '2005-09-05' AND `theDate` <= '2005-09-09'">05 - 09 sep 2005</option>
<option value="`theDate` >= '2005-09-05' AND `theDate` <= '2005-09-09'">05 - 09 sep 2005</option>
<option value="`theDate` >= '2005-09-12' AND `theDate` <= '2005-09-16'">12 - 16 sep 2005</option>
<option value="`theDate` >= '2005-09-19' AND `theDate` <= '2005-09-23'" selected>19 - 23 sep 2005</option>
</select>thanks all...