Jump to content

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


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 :)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.