I have maybe a simple problem. I have two select boxes which are created dynamically by php. You can choose numbers in this fields. I want that in one select box the the smallest number is "pre"selected and in the other box the largest.
My Code:
$res_little=mysqli_query($db_link,"SELECT DISTINCT number FROM ... ORDER BY number ASC");
$res_large=mysqli_query($db_link,"SELECT DISTINCT number FROM ... ORDER BY number ASC");
<select name="little" id="little">
<option></option>
<?php
while($row = mysqli_fetch_array($res_little))
{
echo "<option>";
echo('<p>'.$row['number'].'</p>');
echo "</option>";
}
?>
</select>
<select name="large" id="large">
<option></option>
<?php
while($row = mysqli_fetch_array(res_large))
{
echo "<option>";
echo('<p>'.$row['number'].'</p>');
echo "</option>";
}
?>
</select>