I have the following code, which creates a dropdown list based on the contents of a mysql database. I also have a variable $ir1text which is the users current selection from that database. How can make the drop down list pre-select the value the user already has. The idea being I want to show them what they have and have the dropdown list right there for them to select a new value.
<?php
include("config.php");
$sql1 = "SELECT * FROM iRadios";
$result1 = mysql_query($sql1);
echo "<select name='Station1'>";
while ($row = mysql_fetch_array($result1)) {
echo "<option value='" . $row['StationName'] ."'>" . $row['StationName'] ."</option>";
}
echo "</select>";
?>