this is the entire tag result.php file and you can see where I placed you code (it is toward the end).
Basically what I am trying to do is make sub categories for my categories that I already have. also the URL to my website is couponhunt.net just go down to the coupon Tags section and click one of the links. when you follow the code you can see that I am trying to place your code at the right hand top of the pages so that they will display subcategories.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<?php include ( "core/inc.meta.php" ) ?>
</head>
<body id="home">
<?php include ( "inc.header.php" ) ?>
<!-- end: #header -->
<div id="shell">
<?php include ( "inc.search_header.php" ) ?>
<!-- end: #search -->
<div id="content">
<div id="major">
<div class="panel" id="merchantIntro">
<div class="inner">
<!-- google_ad_section_start(name=summary) -->
<h1>Popular <?php echo $tag["TagName"] ?> Coupons & Promos</h1>
<p>Coupon Hunt.Net offers some of the finest <?php echo $tag["TagName"] ?> Coupons, Promos, Specials and Deals. We carry some of the top <?php echo $tag["TagName"] ?> Promos and also keep an inventory of well stocked offers for all of your needs.<p>
IF there are any coupons or stores that you cannot find please feel free to email us at customersupport@couponhunt.net so that we may add the coupons for you. But for now enjoy your stay and we hope to see you again soon. Have a Happy Hunt!
</p>
<div class="break">
</div>
<div class="inner" align="center">
<?php
$g_ads = $data->select ( "MarketingAdManager" ,"*", array ( "MarketingPlacing" => "Tag Top" ) ) ;
if ( ! empty ( $g_ads ) )
foreach ( $g_ads as $g_ad )
echo $g_ad["MarketingScript"]."<br><br>" ;
?>
</div>
</div>
</div>
<?php
$offers = $data->select ( "Tag_Offers" , "*" , array ( "TagID" => $tag["TagID"] ) ) ;
if ( ! empty ( $offers ) )
{
?>
<div class="panel" id="specialOffers">
<h2><span><?php echo $tag["TagName"] ?> Special Offers</span></h2>
<div class="inner">
<?php
foreach ( $offers as $offer )
{
?>
<div class="categorySponsor">
<?php
if ( $offer["Image"] != "" )
{
?>
<a href="<?php echo base_url ?>out/<?php echo $offer["Tag_OffersID"] ?>/" target="_blank" rel="nofollow">
<img src="<?php echo base_url."media/".$offer["Image"] ?>" alt="None">
</a>
<?php
}
?>
<div class="categorySponsorContent">
<strong>
<a href="<?php echo base_url ?>out/<?php echo $offer["Tag_OffersID"] ?>/" target="_blank" rel="nofollow"><?php echo $offer["OfferTitle"] ?></a>
</strong>
<p> <?php echo $offer["Description"] ?>
<a href="<?php echo base_url ?>out/<?php echo $offer["Tag_OffersID"] ?>/" target="_blank" rel="nofollow">Find out more »</a>
</p>
</div>
<div class="break">
</div>
</div>
<?php
}
?>
<div class="break">
</div>
</div>
</div>
<?php
}
?>
<div class="panel" id="activeCoupons">
<h2><span>Current Top <?php echo $tag["TagName"] ?> Coupons</span></h2>
<div class="inner">
<?php
$tag_web = $data->select ( "Website_Tag" , "*" , array ( "TagID" => intval ( $tag["TagID"] ) ) ) ;
if ( ! empty ( $tag_web ) )
{
foreach ( $tag_web as $tagweb )
{
$web_detail = $data->select ( "Website" , "*" , array ( "WebsiteID" => intval ( $tagweb["WebsiteID"] ) ) ) ;
$web_detail = $web_detail[0] ;
$latest_coupon = $data->select ( "Coupon" , "*" , array ( "WebsiteID" => intval ( $tagweb["WebsiteID"] ) ) , 0 , 1 , "DateAdded desc" ) ;
$coupon = $latest_coupon[0] ;
if ( empty ( $coupon ) )
{
continue ;
}
?>
<div class="coupon abstract" id="c1253505">
<div class="inner">
<div class="subject">
<a class="thumb" href="<?php echo base_url.get_sef_url ( $coupon["WebsiteID"] , "Website" ) ?>/" title="<?php echo $web_detail["WebsiteName"] ?> coupons">
<img src="<?php echo base_url."media/".$web_detail["WebsiteID"].".jpg" ?>" alt="<?php echo $web_detail["WebsiteName"] ?>">
</a>
<h3><span><?php echo $web_detail["WebsiteTitle"] ?></span></h3>
<ul>
<li class="viewCoupons">
<a href="<?php echo base_url.get_sef_url ( $coupon["WebsiteID"] , "Website" ) ?>/"><?php echo $data->count_record ( "Coupon" , array ( "IsApproved" => 1 , "WebsiteID" => $coupon["WebsiteID"] ) ) ; ?> <?php echo $web_detail["WebsiteName"] ?> coupon codes</a>
</li>
</ul>
</div>
<div class="detail">
<div class="crux" >
<span>coupon code:</span>
<strong id="coupon_code_feat_<?php echo $coupon["CouponID"] ?>"><?php echo $coupon["CouponCode"] ?></strong>
<div id="coupon_Tool_tip_action_<?php echo $coupon["CouponID"] ?>" class="couponTooltip">Click to copy & open site</div>
<script language="javascript">
set_copy_command ( "<?php echo $coupon["CouponCode"] ?>" , "coupon_code_feat_<?php echo $coupon["CouponID"] ?>" , <?php echo $coupon["CouponID"] ?> ) ;
</script>
</div>
<p>
<?php echo $coupon["Description"] ?>
</p>
<p class="merchantLink">
<a href="<?php echo base_url.get_sef_url ( $coupon["WebsiteID"] , "Website" ) ?>/">More <?php echo $web_detail["WebsiteTitle"] ?> coupons »</a>
</p>
</div>
<div class="break">
</div>
</div>
</div>
<?php
}
}
?>
</div>
</div>
</div>
<!-- end: #major -->
<div id="minor">
<!-- google_ad_section_start(name=tags) -->
<div class="panel">
<h3><span>Related Coupon Categories</span></h3>
<div class="inner">
<ul class="tags">
<?php
$thisPage=$_SERVER['SCRIPT_FILENAME']; // $thisPage is now the name of ...
// that's right ... this page!
switch ($thisPage) { // we use "switch" instead of a big bunch
// of "if"s and "else"s...
case "1.html": // equivalent to 'if $thisPage=="1.html"'
$text="blah, blah one blah!"; // $text will be the displayed text for the link
$url="blahblah1.html"; // $url will be the href for the link
break; // end the conditional; skip other tests
case "2.html":
$text="blah, two blah!";
$url="blahblah2.html";
break;
case "3.html":
$text="three two one blah!";
$url="blahblah3.html";
break;
case "4.html":
$text="blah, blah blah FOUR!";
$url="blahblah4.html";
break;
}
echo "<a href=\"$url\">$text</a>";
?>
</ul>
<!-- google_ad_section_end(name=tags) -->
<div class="break"></div>
</div>
</div>
<div class="panel">
<div class="inner">
<div class="break">
</div>
<div class="tagCloud">
<?php
$g_ads = $data->select ( "MarketingAdManager" ,"*", array ( "MarketingPlacing" => "Tag Side Bar" ) ) ;
if ( ! empty ( $g_ads ) )
foreach ( $g_ads as $g_ad )
echo $g_ad["MarketingScript"]."<br><br>" ;
?>
</div>
</div>
</div>
<div class="panel">
<h3><span>Top <?php echo $tag["TagName"] ?> Stores</span></h3>
<div class="inner">
<ol class="topList">
<?php
$websites = $data->select ( "Website_Tag" , "*", array ( "TagID" => intval ( $tag["TagID"] ) ) ) ;
if ( ! empty ( $websites ) )
foreach ( $websites as $website ) :
$web_detail = $data->select ( "Website" , "*" , array ( "WebsiteID" => $website["WebsiteID"] ) ) ;
$web_detail = $web_detail[0] ;
?>
<li>
<a href="<?php echo base_url.get_sef_url ( $website["WebsiteID"] , "Website" ) ?>/" title="<?php echo $web_detail["WebsiteTitle"] ?> Coupon Codes"><?php echo $web_detail["WebsiteName"] ?></a>
</li>
<?php
endforeach ;
?>
</ol>
</div>
</div>
<?php
include ( "inc.social.php" ) ;
?>
</div>
<!-- end: #minor -->
<div class="break">
</div>
</div>
<!-- end: #content -->
</div>
<div align="center" style="clear:both">
<?php
$g_ads = $data->select ( "MarketingAdManager" ,"*", array ( "MarketingPlacing" => "Tag Bottom" ) ) ;
if ( ! empty ( $g_ads ) )
foreach ( $g_ads as $g_ad )
echo $g_ad["MarketingScript"]."<br><br>" ;
?>
</div>
<?php include ( "inc.footer.php" ) ?>
<!-- end: #footer -->
</body>
</html>