Forum Moderators: coopster
At the top of my wrapper.php page (the template), I place the following ...
<?
// Start the session and register the variables
SESSION_START();
header("Cache-control: private");
SESSION_REGISTER("EmptyField");
SESSION_REGISTER("Affiliate");
SESSION_REGISTER("LandingPage");
SESSION_REGISTER("CurrentPage");
$URL_data = explode("/", getenv("REQUEST_URI"));
// Get tracking information form the URL array
$_SESSION['EmptyField'] = $URL_data[0] ;
$_SESSION['Affiliate'] = $URL_data[1] ;
if ($LandingPage == "") {$_SESSION['LandingPage'] = $URL_data[2] ; }
$_SESSION['CurrentPage'] = $URL_data[2] ;
// Fill in the blanks on the page header
$ThisPageName = ucfirst($CurrentPage);
include $CurrentPage . '.php' ;
?>
And then in the cell where I need the content, I use the following ...
<td><br>
******************** Variable appears below ********************
<? echo $var2?>
</td>
The contents of a content file may contain items such as this ...
<? $var1="Some Content"?>
<? $var2 = '
<br>
Empty Field? = <?php echo $EmptyField;?><br>
Affiliate Num? = <?php echo $Affiliate;?><br>
Landing Page? = <?php echo $LandingPage;?><br>
Current Page? = <?php echo $CurrentPage;?><br>
'?>
The variables $var1 and $var2 are called and placed in their appropriate locations, however the php script in the variable $var2 is not parsed, and does show in the source as unprocessed php code, but does not show in the browser.
I have tried the variable with single and double quotes. Is there another function I should consider, and how would I use it?
Many thanks.