FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » problem saving date fields
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: problem saving date fields [message #174097 is a reply to message #174096] Sat, 21 May 2011 14:02 Go to previous messageGo to previous message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma:
Senior Member
On 21-05-2011 15:46, Luuk wrote:
> On 21-05-2011 14:12, Co wrote:
>> <option value="01">1</option>
> ....
>> <option value="31">31</option>
>
>
>> Sorry for the length
>> Marco
>
> ;)
>
> replace it with:
> <?php
> for ($x=0; $x<=31; $x++) {
> printf('<option value="%02d">>%02d</option>', $x, $x);
> } ?>
>

oops, you need to select some option:

<?php
$day=21;
for ($x=0; $x<=31; $x++) {
printf('<option value="%02d" ', $x);
if ($x==$day) { print ' selected="yes"'; }
printf('>%02d</option>', $x);
} ?>


--
Luuk
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: is dis da place?
Next Topic: foreach in reverse
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 21:05:33 GMT 2024

Total time taken to generate the page: 0.04374 seconds