1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <td> <select id="telegrams"> if(isset($selectedPeriod)) { $result = $db->query("SELECT * FROM telegrams WHERE period = '$selectedPeriod'"); while ($telegram = mysqli_fetch_assoc($result)) { $telegramName = $telegram['name']; $telegramId = $telegram['id']; echo "<option value='$telegramId' $selected>$telegramName</option>"; } } </select> </td> |