I want my table to only list the fields that have the same SubId as the one chosen in the dropdown menu by the user. Lets call this variable $Test.
How can I only show the fields in this table where SubId = $Test?
Maybe a foreach loop? Somebody care to help?
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td>SubId</td>
<td>CatId</td>
<td>SubName</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['SubId']; ?></td>
<td><?php echo $row_Recordset1['CatId']; ?></td>
<td><?php echo $row_Recordset1['SubName']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
How can I only show the fields in this table where SubId = $Test?
Maybe a foreach loop? Somebody care to help?
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td>SubId</td>
<td>CatId</td>
<td>SubName</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['SubId']; ?></td>
<td><?php echo $row_Recordset1['CatId']; ?></td>
<td><?php echo $row_Recordset1['SubName']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>








