<BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
$dbcnx = @mysql_connect("localhost", "root", "pw");

$catagories = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM categories"));
for($tempVar = 1; $tempVar &lt;= $catagories["COUNT(*)"]; $tempVar++)
$authordetails = mysql_query("SELECT Name, id FROM categories WHERE id=$tempVar");

$author = mysql_fetch_array($authordetails);
$name = $author["Name"];
$id = $author["ID"];


$Catagories = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM Categories where ID=$tempVar"));
for($tempVar2 = 1; $tempVar2 &lt;= $Catagories["COUNT(*)"]; $tempVar2++)
$authordetails2 = mysql_query("SELECT Name, ID FROM Categories WHERE catid=$tempVar2 AND ID=$tempVar");

$author2 = mysql_fetch_array($authordetails2);
$name = $author2["Name"];
$id = $author2["ID"];

echo("&lt;A HREF=list.php3?catid=$id&gt;$name&lt;/A&gt;&lt;BR&gt;");

Don't worry about the variable names, okay? I pasted it out of my other script...

It is supposed to display the categories with the forums under it - but it just doesn't work


Webmasters' Network
WebDevHQ.com - The Web Developer Headquarters
WebmasterChronicles.com - FREE online newsletter!