I have an include in the head of my php file:
include 'scripts/tracking_code.php';
In there, I run a basic test with if/else and echo some basic text.
Problem is that nothing is getting printed to screen.
I then just tried to print something a little more basic... The tracking_code.php now simply includes this:
echo "<!-- This is the file -->";
Still nothing?
I know the include is getting included because when I turn E_ALL error reporting, the $_GET[] call throws a "Notice: Undefined index:"
Here is my original code (before simply replacing with "echo" (as above))
<?php
$trackingid = $_GET['trackingid'];
if ( !empty( $trackingid ) ) {
echo "<!-- trackingid: $trackingid -->";
} else {
echo "<!-- trackingid is empty -->";
}
?>
Yet nothing is ever printed?
What am I missing?
<!-- trackingid: $trackingid -->signifies a comment in HTML and you'll not see it on the screen.