I'm working on a Staff Page for my new website and I have put together my own PHP Staff System allowing administrators to add users into categorys of the page without cPanel access.
I'm having problems with the Staff Page itself though. As you will be able to see in my code below; where echo is in the second while function - I am showing the users infomation which has been collected from the database. My page can only contain a few of these pages before it makes the content box bigger.
I've been searching Google for a long time trying to firgure out how I could make it so:PHP Code:<font class="heading">The Team</font><br>
<?
$forum_names = mysql_query("SELECT * FROM staffcategorys");
while($name = mysql_fetch_array($forum_names))
{
?>
<b><? echo"$name[name]"; ?></b> - <? echo"$name[description]"; ?><br><br>
<?
echo'<table width="100%" align="center"><tr>';
$staff_names = mysql_query("SELECT * FROM staffmembers WHERE fid = $name[id]");
while($staff = mysql_fetch_array($staff_names))
{
?>
<td align="center" width="25%" style="padding-bottom: 10px;"><img src="<? echo"$staff[avatar]"; ?>" border="0" alt="<? echo"$staff[habboname]"; ?>"><div style="padding-top: 4px;"><b><? echo"$staff[habboname]"; ?></b><br><? echo"$staff[jobtitle]"; ?></div></td>
<?
}
echo'</tr></table>';
}
For every Third, Sixth, Ninth, Tewlth and so on (3 times table) <td displaying the details* (that is created from:
)PHP Code:$staff_names = mysql_query("SELECT * FROM staffmembers WHERE fid = $name[id]");
while($staff = mysql_fetch_array($staff_names))
{
* a </tr><tr> is inserted so my content box does not expand.
If you do not understand me, please let me know. This is not an easy think to explain.





Reply With Quote





