I have a related question to this one.
I have a site that I'm working on where I have a global variable in the main link for affiliate accounts where the page is set up like this:
http://www.url.com/?site_id=12345
That triggers the variable $linktext2
$linktext2 = "&site_id=$site_id";
I have been able to pass the variable to every other url on the page except for the one dynamically created in this function:
function makePageLink($pageNum,$linkTitle="") {
$pageName="page.php";
$link= "<a class=blue href=\"".$pageName;
$link.= "?page=" .$pageNum;
$link.= $linktext2;
$link.= "\">";
if ($linkTitle != "") {
$link .= $linkTitle;
} else {
$link .= $pageNum;
}
$link.= "</a>";
return $link;
}
If I echo that value before and after the function it prints the variable just fine, just not during. Any thoughts?
Ian