There is a form of recording. I will arrange the output name in select using this code :.
<?php include("../bd.php"); connect(); // вывод фио доктора $sotr = mysql_query("SELECT * FROM doctor"); if ($sotr == true) { echo "<select>"; while ($s = mysql_fetch_array($sotr)) { echo "<option>".$s['family']." ".$s['name']." ".$s['patronymic']."</option>"; } echo "</select>"; } else { echo "Сотрудники отсутствуют"; } How to write to database selected values in select ?