The problem is that in single quoted strings, PHP variables are not interpreted as such. You should either concatenate (join) them, or use double quoted strings. Also, SQL strings are single quoted, not double quoted. As such, you should write:
$navigatie = mysql_query("SELECT tblrecept.receptid, tblrecept.receptnaam FROM tblrecept WHERE tblrecept.categorieid = '$categorieid'") or die(mysql_error());
Don't come with your way of writing a query.
Actually, you are executing queries in a loop, which is typically a Bad Thing. So, a likely better solution is to use a join.
EDIT:
Here is a possible untested solution using a join:
<?php
$query = "SELECT C.categorienaam, C.categorieid, R.receptid, R.receptnaam
FROM tblrecept R, tblcategorie C
WHERE R.categorieid=C.categorieid
ORDER BY C.categorieid";
$result = mysql_query($query) or die(mysql_error());
$categorieid = 0;
while ($row = mysql_fetch_assoc($result))
{
if ($row['C.categorieid'] != $categorieid)
{
$categorieid = (int)$row['C.categorieid'];
$categorienaam = htmlspecialchars($row['C.categorienaam']);
echo "<p><b>$categorienaam, $categorieid</b></p>";
}
$receptID = (int)$row['R.receptid'];
$receptnaam = htmlspecialchars($row['R.receptnaam']);
echo "<a href='recept.php?id=$receptID'>$receptnaam</a><br />";
}
?>
Only one SQL statement is executed, which is much more efficient.