Ik zou het liever zo doen met 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);
?>
Voeg vervolgens de elementen als volgt toe aan html:
<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>