All right.
Try not to have PHP do all the work that HTML could do. Let the client do the work. The more work the server has to do (hince the HTML work the worse off the server will be. That is just what I have been told though I am no perfectionist.
<td width="112"><select name="fs_dl[]">
<option selected>Drive Letter</option>
<?php
/// ASSUMING THE CONNECTIONS AND SQL STATEMENT WAS PERFECT. I am also assuming the comparison is named $comparison.
// Make an array of the alphabet. (BEATS TYPING IT OVER AND OVER!)
$alpha_array = array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
// Take each value of the array piece by piece.
foreach($alpha_array as $temp_alpha)
{
// Compare the piece to what your looking for.
if($temp_alpha == $comparision)
{
// They matched! Now it will overwrite the first "selected" at the top and place it here. It always takes the last one who declared itself as "selected"
echo "<option value='$temp_alpha' selected>$temp_alpha</option>";
}else{
// Oh, not the one your looking for. Therefore it just prints this out as a possible option.
echo "<option value='$temp_alpha'>$temp_alpha</option>";
} // Stop comparing
}
// Don't forget to close the connection to the database.
?>
<!-- Round out your select statement. -->
</select></td>
This might not be the fastest way to do it but man I know it works. :-D I use this for large amounts of data to sift through. Without the connection to the db or what variable your deriveing from the database I can't guess what your comparision variable is named. I haven't tested this but am pretty sure it works. Take care and hope this helps.
Please read my CYA statement (Cover Your Ass)
:-D
Chad