Sycoloco1212
11-29-2008, 11:03 AM
PHP CODE:
<?
include ('./config.php');
$sql = mysql_query("SELECT * FROM ava_cats ORDER BY name");
$total_cats = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM ava_cats"),0);
$total_cats2 = 0;
while($row = mysql_fetch_array($sql))
{
$total_cats2 = ($total_cats2 + 1);
if($seo_on == 0)
{
echo ' <a href="'.$site_url.'/index.php?cat_id='.$row['id'].'">'.$row['name'].'</a> ';
}
else
{
$abcd= $row['name'];
$abcd = str_replace (" ", "-", $abcd);
echo ' <a href="'.$site_url.'/cat/'.$row['id'].'/'.$abcd.'/p1.htm">'.$row['name'].'</a> ';
}
if ($cat_numbers == 1)
{
$cat_numb = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM ava_games WHERE catergory_id=".$row['id'].""),0);
echo '<em>('.$cat_numb.')</em>';
}
if($total_cats2 != $total_cats)
{
echo ' |';
}
}
?>
HTML CODE
<div class="TFHmenu2">
<ul><li style="float: right;">
<li><a href="#" class="selected">LINK 1</a></li>
<li><a href="#" >LINK 2</a></li>
<li><a href="#">LINK 3</a></li>
<li><a href="#">LINK 4</a></li>
<li><a href="#">LINK 5</a></li>
<li><a href="#">LINK 6</a></li>
<li><a href="#">LINK 7</a></li>
</ul> </div>
<br />
how would i put these together?
the php file is a script i use in a admin section off a page i use and it adds a new gategory when i need to, i want the text inside the php file to be more nicer with a background, if anyone can do this then thanks =) also if u know any good sites i can get help with this it would be much appreciated =P
<?
include ('./config.php');
$sql = mysql_query("SELECT * FROM ava_cats ORDER BY name");
$total_cats = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM ava_cats"),0);
$total_cats2 = 0;
while($row = mysql_fetch_array($sql))
{
$total_cats2 = ($total_cats2 + 1);
if($seo_on == 0)
{
echo ' <a href="'.$site_url.'/index.php?cat_id='.$row['id'].'">'.$row['name'].'</a> ';
}
else
{
$abcd= $row['name'];
$abcd = str_replace (" ", "-", $abcd);
echo ' <a href="'.$site_url.'/cat/'.$row['id'].'/'.$abcd.'/p1.htm">'.$row['name'].'</a> ';
}
if ($cat_numbers == 1)
{
$cat_numb = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM ava_games WHERE catergory_id=".$row['id'].""),0);
echo '<em>('.$cat_numb.')</em>';
}
if($total_cats2 != $total_cats)
{
echo ' |';
}
}
?>
HTML CODE
<div class="TFHmenu2">
<ul><li style="float: right;">
<li><a href="#" class="selected">LINK 1</a></li>
<li><a href="#" >LINK 2</a></li>
<li><a href="#">LINK 3</a></li>
<li><a href="#">LINK 4</a></li>
<li><a href="#">LINK 5</a></li>
<li><a href="#">LINK 6</a></li>
<li><a href="#">LINK 7</a></li>
</ul> </div>
<br />
how would i put these together?
the php file is a script i use in a admin section off a page i use and it adds a new gategory when i need to, i want the text inside the php file to be more nicer with a background, if anyone can do this then thanks =) also if u know any good sites i can get help with this it would be much appreciated =P