Validating against DB
I have a total number of people allowed in a class... I would like to have the class disappear from the dynamic drop down based on wether the count is <= 25...
This is what I have so far, I'm thinking there's an easier way using our WA tools...
<option value="<?php echo $row_ClassDetails['CDID']; ?>" >
$mysqldate = $row_ClassDetails['CDDate'];
$mydate = date("M, d Y",strtotime($mysqldate));
<?php echo $row_ClassDetails['CDName']; ?> -
$cdid = $row_rtnUser['CDID'];
$sql = "SELECT COUNT(CDID) AS total FROM rtnUser WHERE CDID = $cdid";
$query = mysql_query($sql);
$recordset = mysql_fetch_assoc($query);
$count = $recordset["total"];
?> of <?php echo $row_ClassDetails['CDMaximum']; ?> max.
} while ($row_ClassDetails = mysql_fetch_assoc($ClassDetails));
This returns a "1" for all of the 7 classes.
The first class has a single user, the rest have 0...
Any help would be great!