Well, I've looked through lots of them and not one of them I could understand, I've managed to come up with this code on my own:
<?
include "connect.php";
$sql = "SELECT * FROM CatID order by CatID ASC";
$query = mysql_query($sql) or die("Cannot query the database.<br>" . mysql_error()); //Query the database or die if failed
while($result = mysql_fetch_array($query)) //grabbing all links from query
{
$name=stripslashes($result["name"]);
$CatID=stripslashes($result["CatID"]);
{
echo "
<A href='category.php?CatID=$CatID'>$name</a>
<br><br>
"
;}
}
?>
It displays categories with ID=5 and stuff like that, when I click on it, it just reloads the same page, how do I insert links into categories like that, I'm so confused.