Posted by Michael Fesser on 07/19/07 23:21
..oO(YvesDM)
>I already resolved this.
>My solution is not 100% clean, but it does what I want :-)
>I just an extra option on top of the list which has the selected tag
>and always takes the value of the current month ;-)
Ugly. Why not just let PHP print out all the options in a simple loop?
You could even let it generate the month names automatically if you want
(assuming proper locale support).
> <option value='$monthnow'selected>Current month</option>
There has to be a space between attributes. Additionally it's better
style to not use minimized attributes, but to write them according to
the stricter XHTML rules. This makes it easier to upgrade in the future.
So the result should look like
<option value='7' selected='selected'>Juli</option>
Micha
Navigation:
[Reply to this message]
|