Hi all,
Can anyone tell me where i am going wrong here. The error i am getting says:
PHP Warning: Supplied argument is not a valid MySQL result resource in /s101/home2/melbourne/trial1.php on line 6
My script is below:
<?
$link = mysql_connect('localhost', 'username', 'password');
mysql_select_db('melbourne');
$query = "SELECT * from Categories where CatParent IS NULL ORDER BY CatName";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
echo "<a href=\"http://trial2.php?id={$row['CatID']}\">{$row['CatName']}</a><br>\n";
}
?>
Any ideas?
Cheers,
micmac