Forum Moderators: open
I have never used ajax before but I know php/mysql well.
Here is my code that populates the first box:
<SELECT name="owcdate">
<option value='' SELECTED> -
<?
include 'connection.php';
$gtdp2 = date('m/d/y', strtotime('+2 Day'));
$query="SELECT * FROM avail WHERE owcdate='$gtdp2' LIMIT 1";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$id=mysql_result($result,$i,"id");
$owcdate=mysql_result($result,$i,"owcdate");
echo "<option value='$owcdate'>$owcdate";
++$i;
}
mysql_close($link);
?>
</select>
[edited by: Asbillszit at 6:11 am (utc) on July 18, 2008]
If you want to simplify the AJAX part, you could use something like the Yahoo UI Library [developer.yahoo.com]'s Connection Manager. It handles the cross-browser issues providing you with an easy to use and well documented API.