I am trying to make a bookmark page where I can add bookmarks to a database so I can access my favorites from anywhere.
Everything works except for the display page.
I have two tables
1) Keeps all the types of Favorites Categories (Lan Party Sites, PC Sites, etc)
2) All the links
What I want it to do is get the name from the Category table and the link name and path from the Link table
Here is the code..What it does is it displays all the ones for the first category but none of the links for the next categories after that..
<?
require_once("../includes/common.php");
if(!db_connect())
echo "Error connecting to database";
$SQLTypes = mysql_query("SELECT * FROM favoriteType ORDER BY favoriteType");
$SQLFavs = mysql_query("SELECT * FROM myFavorites ORDER BY favoriteType");
$num_Types = mysql_num_rows($SQLTypes);
$num_Favs = mysql_num_rows($SQLFavs);
for($a=0;$a<$num_Types;$a++)
{
$rowType = mysql_fetch_array($SQLTypes);
$typeNumber = $rowType["favoriteType"];
echo $typeNumber. ") ";
echo $rowType["favoriteTypeName"]. "<hr>";
do
{
$rowFavs = mysql_fetch_array($SQLFavs);
$favType = $rowFavs["favoriteType"];
if($favType == $typeNumber)
{
echo "<a href='" .$rowFavs["linkURL"]. "'>" .$rowFavs["linkName"]. "</a><br>";
}
}
while($favType == $typeNumber);
}
?>