Im very new to PHP and MySQL so would appreciate if anyone could help me with the following.
I am trying to display the list of categories that are in my mySQL database to be displayed on the website for the user to select from which will take them the page of products related to that category.
The errors im getting on index.php are:
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\wamp\www\website_Millhouse\bar.php on line 14
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\wamp\www\website_Millhouse\bar.php on line 14
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\wamp\www\website_Millhouse\bar.php on line 15
here is the code from bar.php
<body>
<h1>Product Categories</h1>
<ul>
<?php
$catsql = "SELECT * FROM categories;";
$catres = mysql_query($catsql);
while($catrow = mysql_fetch_assoc($catres))
{
echo "<li><a href='" . $config_basedir
. "/products.php?id=" . $catrow['id'] . "'>"
. $catrow['name'] . "</a></li>";
}
?>
</ul>
</body>