I'm using the select tag to populate a dynamic list of work categories from our database. I accomplished this just fine but how do I now make those list items link to the corresponding pages?
ie. Click on Accounting and populate a page with only those members in the accounting field.
ie. Click on Accounting and populate a page with only those members in the accounting field.
Code:
<div id="Categories"><select name="list" size="105">
<?php
do {
?>
<option value="<?php echo $row_RS_Categories['ID']?>"<?php if (!(strcmp($row_RS_Categories['ID'], urlencode($row_RS_Categories['Categories'])))) {echo "selected=\"selected\"";} ?>><?php echo $row_RS_Categories['Categories']?></option>
<?php
} while ($row_RS_Categories = mysql_fetch_assoc($RS_Categories));
$rows = mysql_num_rows($RS_Categories);
if($rows > 0) {
mysql_data_seek($RS_Categories, 0);
$row_RS_Categories = mysql_fetch_assoc($RS_Categories);
}
?>
</select>
</div>
Comment