<?php
require_once "../includes/db.php";
header('Content-Type: text/html; charset=utf-8');

$rs = $conn->query("SELECT id, name FROM courses ORDER BY name ASC");
echo '<option value="">-- Select Course --</option>';
if ($rs) while($r = $rs->fetch_assoc()){
  $name = htmlspecialchars($r['name']);
  echo "<option value=\"$name\">$name</option>";
}
