Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
At the very top of my document i include a PHP file which has 2 global variables. They are then also set in that file. But further down the page i'd like to access them and seem to have trouble doing so via the <cms:php tag. Work fine with normal <?php tags.

Am i missing something? In the include file it would look something like this:
Code: Select all
global $siteCCode;
global $userCCode;

$userCCode = $cCode;
$siteCCode =  $cCode;


And further down the page where i try to access those variables:
Code: Select all
<cms:php>
echo $siteCCode . " / " . $userCCode;
</cms:php>


Doesn't output anything :-S Cant use <?php tags as the page is a <cms:embed page where using <?php tags doesn't seem to work.
Please try the following -
Code: Select all
<cms:php>
    global $siteCCode, $userCCode;
    echo $siteCCode . " / " . $userCCode;
</cms:php>
Works perfectly, thanks KK
3 posts Page 1 of 1