Archive for September, 2009



Todays date selected in date fields

POOR mans way of doing this, 3 combo box’s with day/month/year, with todays date already selected,
using my previous changing variable name method
<?php
$day = date("d");
$month = date("m");
$year = date("y");

${’daysel’.$day} = ’selected="selected"’;
${’monthsel’.$month} =  ’selected="selected"’;
${’yearsel’.$year} = ’selected="selected"’;
?>

<html>
<form>
<table>
<tr>
<td><select name="day">
    <option value="01" <?php echo $daysel01; ?>>1</option>
    <option value="02" <?php echo $daysel02; ?>>2</option>
    <option value="03" <?php echo $daysel03; [...]