Hello. I need some help in solving a php code project. I have a combo box field (months) that pulls all 12 months from a MYSQL table. The combo box is populated using php. I want to know how can I evaluate the value in the Select tag to do the following.
1) To count the certified, express and/or ground mail for a particular month
2) Storing the mail count in a variable and assign it to a text field <input name="Mcer"....
Here is the code:
<form name="mdropD">
<select name="months" size="1">
<?php
require_once('Connections/WmidsCon.php');
mysql_select_db($database_WmidsCon, $WmidsCon);
$query_monthopt = "SELECT Months FROM tblmonths";
$monthopt = mysql_query($query_monthopt, $WmidsCon) or die(mysql_error());
$row_monthopt = mysql_fetch_assoc($monthopt);
$totalRows_monthopt = mysql_num_rows($monthopt);
do {
?>
<option value="<?php echo $row_monthopt['Months'];?>"
<?php if(!(strcmp($row_monthopt['Months'],$row_monthopt['Months'])))?>><?php echo $row_monthopt['Months'];?> </option>
<?php
} while($row_monthopt = mysql_fetch_assoc($monthopt));
?>
</select>
</form>
</div></td>
</tr>
<tr>
<td><div align="left">CER:</div></td>
<td><div align="left"> <input name="Mcer" type="text" id="Mcer" size="10" maxlength="10" readonly="readonly" />
</div></td>
</tr>
<tr>
<td><div align="left">EXP:</div></td>
<td><div align="left"> <input name="Mexp" type="text" id="Mexp" size="10" maxlength="10" readonly="readonly" />
</div></td>
</tr>
<tr>
<td><div align="left">GRD:</div></td>
<td><div align="left"> <input name="Mgrd" type="text" id="Mgrd" size="10" maxlength="10" readonly="readonly" />
</div></td>
</tr>
</table>