Jump to content


Photo

Php Forum Build Help needed


  • Please log in to reply
3 replies to this topic

#1 Del

Del
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 26 March 2006 - 07:52 AM

I need help in building my forum because to view the categorys and forums i've used While then in the middle of that while another while making it not work because there it will only got thru the second while once due to the first one not reapeating cause it doesn't know it has to, Anyone got any Ideas and ask if i should post my script on

#2 TEENFRONT

TEENFRONT
  • Members
  • PipPipPip
  • Advanced Member
  • 338 posts

Posted 26 March 2006 - 09:31 AM

...what? lol

Post some code dude..
Teenfront.co.uk : Free Teen Chat -  FunkySmileys.co.uk : MSN Smileys -  ArcadeMonkey.co.uk : Free Flash Games
8Baller.co.uk : Free Multiplayer Pool [url=http://8Baller.co.uk]

#3 Del

Del
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 26 March 2006 - 10:02 AM

<?
include("dbconnect.php");
$a=0;
$b=0;
?>
<table cellpadding="0" cellspacing="0" width="430" style="border-color: #000000; border-width: 1px;">
<?
while($a < $catnum) {

$cat=mysql_result($catresult,$a,"name");
?>
<tr>
<td width="206" style="border-bottom: solid; border-left: solid; border-top: solid; border-width: 1px;"><font face="Verdana" size="2">&nbsp;<b><? echo $cat; ?></b></font></td>
<td width="70" align="center" style="border-bottom: solid; border-left: solid; border-top: solid; border-width: 1px;"><font face="Verdana" size="1">Post Num</font></td>
<td width="85" align="center" style="border-bottom: solid; border-left: solid; border-top: solid; border-width: 1px;"><font face="Verdana" size="1">Thread Num</font></td>
<td width="150" align="center" style="border-bottom: solid; border-left: solid; border-top: solid; border-right: solid; border-width: 1px;"><font face="Verdana" size="2">Latest Post:</font></td>
</tr>
<?
$a++;
$forumquery="SELECT * FROM forums WHERE catgroup='$cat' ORDER BY `ordernum` ASC";
$forumresult=mysql_query($forumquery);
$forumnum=mysql_num_rows($forumresult);

while($b < $forumnum){

$catname=mysql_result($forumresult,$b,"name");
$description=mysql_result($forumresult,$b,"description");
?>
<tr>
<td width="206" style="border-bottom: solid; border-left: solid; border-width: 1px;"><font face="Verdana" size="2">&nbsp;<b><? echo "$catname</b><br>$description"; ?></font></td>
<td width="70" align="center" style="border-bottom: solid; border-left: solid; border-width: 1px;"><font face="Verdana" size="1">Post Num</font></td>
<td width="85" align="center" style="border-bottom: solid; border-left: solid; border-width: 1px;"><font face="Verdana" size="1">Thread Num</font></td>
<td width="150" align="center" style="border-bottom: solid; border-left: solid; border-right: solid; border-width: 1px;"><font face="Verdana" size="2"><? echo "$cat -- $catname || "; ?></font></td>
</tr>
<?
$b++;
}
echo "<tr><td>&nbsp;&nbsp;</td></tr>";
}
?>
</table>
Thats my Code and at the top there is While and in that While is another While

#4 Del

Del
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 26 March 2006 - 07:56 PM

Bump - Help Please Anyone?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users