Preferoval bych to udělat takto pomocí mysqli
<?php
/* Database connection settings */
$host = 'localhost';
$user = 'root';
$pass = '';
$db = 'tnews2';
$mysqli = new mysqli($host,$user,$pass,$db) or die($mysqli->error);
/* Your query */
$result = $mysqli->query("SELECT name,id,path FROM categories ORDER BY ID DESC LIMIT 0,6";) or die($mysqli->error);
?>
Poté přidejte prvky do html takto:
<select name="categories">
<option value="Select School">Select Shool</option>
<?php
while ($row = mysqli_fetch_array($result)) {
echo "<option value='" . $row['path'] . "'>'" . $row['name'] . "'</option>";
}
?>
</select>