$strProduct = "<a href=\"order.php?productcategoryid=".$dblProductCategoryID."&producttypeid=".$dblProductTypeID."&productsubtypeid=".$dblProductSubTypeID."&productsubtype2id=".$dblProductSubType2ID."&brandid=".$dblBrandID."";
this is your link on main.php as far as I understand. First of all you do not need to include your counter.php page. If you have ? and/or & signs, this won't work. What you can do is this:
Code:
<script language="javascript">
function sendToCount(myLink)
{
document.myForm.hLink.value=myLink;
document.myForm.submit();
}
</script>
<form name="myForm" action="counter.php" method="post" style="display:none">
<input type="hidden" name="hLink" value=""><input type="submit">
</form>
<?php
$strProduct = "<a href=\"#\" onclick=\"sendToCount('order.php?productcategoryid=".$dblProductCategoryID."&producttypeid=".$dblProductTypeID."&productsubtypeid=".$dblProductSubTypeID."&productsubtype2id=".$dblProductSubType2ID."&brandid=".$dblBrandID."')\">click me</a>";
?>
The code above will be on your main.php page. On your counter.php:
$link = $_POST['hLink'];//now you add your data to the place you need
//your adding code here
header('Location:'.$link);
_________________
www.eb-downloads.com
FREE E-BOOKS DOWNLOADS.