First, before this line:
$result=mysql("$DBName","SELECT * FROM Category ORDER BY Category");
Make sure you do a mysql_connect(hostname, username, password); .
Second, the function you should be using on that line is mysql_db_query(database_name, query). Also, after the query, try using echo mysql_error() .. this will help you debug your database applications. Hope that helps!
Chris King