$rs = mysql_query("SELECT DISTINCT(DATE_FORMAT(date_paid,'%Y') ) as mindate FROM purchase ORDER BY mindate ASC");
?>
<select name="dy">
<?php
while( $minDate = mysql_fetch_array($rs) ) {
$seldm = $_GET['dy'] == $minDate['mindate'] ? 'selected="selected"' : '';
echo '<option value='.$minDate['mindate'].' '.$seldm. '>'.$minDate['mindate'].'</option>';
}
?>
</select>
?>
<select name="dy">
<?php
while( $minDate = mysql_fetch_array($rs) ) {
$seldm = $_GET['dy'] == $minDate['mindate'] ? 'selected="selected"' : '';
echo '<option value='.$minDate['mindate'].' '.$seldm. '>'.$minDate['mindate'].'</option>';
}
?>
</select>
No comments:
Post a Comment