Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 173 | Replies: 1
![]() |
•
•
Join Date: Aug 2005
Location: Cologne, Germany
Posts: 127
Reputation:
Rep Power: 4
Solved Threads: 10
as simple as this:
This should work, even though I haven't tested. If you find an error it must be something like missing ; or bracket. If it's not working properly please ask again^^.
Greetings
Simon
<?
//Getting the current day:
$today=date("d");
//String for the dropdown...
$dropstring="<select>";
for($x=1;$x<=31;$x++){
$c="";
if($x==$today)$c=" selected";
$dropstring.="<option value=\"".$x."\"".$c.">".$x."</option>";
}
$dropstring.="</select>";
echo $dropstring;
?>This should work, even though I haven't tested. If you find an error it must be something like missing ; or bracket. If it's not working properly please ask again^^.
Greetings
Simon
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode