Hi all,
I have this simple cms for a client, who wants to add an event to the database using year, month, date & day.
He then wants these events to order themselves when displayed so that 2009 dates fall before 2010, then the month & date, so all nicely in order.
So this is how i thought about going about it:
The others work in exactly the same way, as in the value.
So once submitted the values go into the database as numbers, then what i am unsure of is how to change that value back day, and the same goes for the others, and also to have it all nicely ordered down the page.
As below:
The example above is using the same principle, but the values are the actualy days, months, dates and years, and thats why it isnt ordering properly.
Any help, will be good, I know its basic stuff, but I need some help please.
Cheers
I have this simple cms for a client, who wants to add an event to the database using year, month, date & day.
He then wants these events to order themselves when displayed so that 2009 dates fall before 2010, then the month & date, so all nicely in order.
So this is how i thought about going about it:
Code:
<select name="dayDate" id="dayDate">
<option value = "1">Monday</option>
<option value = "2">Tuesday</option>
<option value = "3">Wednesday</option>
<option value = "4">Thursday</option>
<option value = "5">Friday</option>
<option value = "6">Saturday</option>
<option value = "7">Sunday</option>
</select>
The others work in exactly the same way, as in the value.
So once submitted the values go into the database as numbers, then what i am unsure of is how to change that value back day, and the same goes for the others, and also to have it all nicely ordered down the page.
As below:
The example above is using the same principle, but the values are the actualy days, months, dates and years, and thats why it isnt ordering properly.
Any help, will be good, I know its basic stuff, but I need some help please.
Cheers