I have checked other questions with the same title but can't fix this. I have connected to the database though because the login works and I can display the user's username. Here is the relevent code, the second part is what's causing the error, thanks:
<?php require 'connection.php' ?>
<?php
session_start();
?>
<content>
<?php
//Select all from the categories table and order by the category title in ascending order (ASC)
$sql = "SELECT * FROM categories ORDER BY category_title ASC";
//$res = the result of the above query or die if error
$res = mysql_query($sql) or die (mysql_error());
if (mysql_num_rows($res) > 0) {
} else {
"<p>No categories availible</p>";
}
?>
</content>