Jump to content

Help! I can't seem to get my code working. Help :)


marklarah

Recommended Posts

<html>
<title>TLS-3 Foums</title>


<body  bgcolor="#000000">
<p>Hi</p>
<table width="900" align="center" border="0">
<tr>
<td width="100%" height="133">
<img src="top.gif" width="900" height="133"></td>
</tr>
<tr>
<td width="100%" height="30" bgcolor="#333333">
<font color="#FFFFFF" face="Bell MT, Bahtang, Helvetica"><? include 'bar.php'; ?></font>
</td>
</tr>
<tr>
<td width="100%" bgcolor="555565">


<?php

include 'dbs.php';


//echo '<table border="0"><tr><td>';

?>
<font face="Arial, Helvetica"><h1>Forums
<hr width="300" color="white" align="left"></h1></font><br><br>
<table width="94%" border="1">
<?
$result="SELECT * FROM `cats` ORDER BY ID";
$articles = mysql_query($result) or die(mysql_error());
$num = mysql_num_rows($articles);

if($num>0){






while ($row = mysql_fetch_array($articles)){




$catID = $row['ID'];
$title = $row['title'];
$caption = $row['caption'];

echo '<tr><td align="center"><h2>'.$title.' -- </h2><h4>'.$caption.'</h4></td></tr>';




$resultb="SELECT * FROM `boards` WHERE `CAT ID` = '$catID'";
$articlesb = mysql_query($resultb) or die(mysql_error());
$numb = mysql_num_rows($barticles);

if($numb>0){
while ($row = mysql_fetch_array($barticles)){
$btitle = $row['title'];
$bcaption = $row['caption'];

echo '<tr><td>'.$btitle.' -- '.$bcaption.'</td></tr>';
              }
           }else{
echo "hi";
}
         }
      }
echo '</table>';
?>









</td>
</tr>
</table>

 

 

 

No login required, but see what happens for yourslef:

 

tls-3.977mb.com

 

I wan't the boards to display under the catagories, but the boards don't show.

 

 

Help please :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.