I am using the following PHP if statement on my website:
<?php
if(empty($_GET['tid']))
echo '<iframe src="http://tracking.mydomain.com/aff_goal?a=33&goal_id=47" scrolling="no" frameborder="0" width="1" height="1"></iframe>';
else
echo '<iframe src="http://tracking.mydomain.com/aff_goal?a=29&goal_id=37&transaction_id=<? echo $tid; ?>" scrolling="no" frameborder="0" width="1" height="1"></iframe>';
?>
The actual php if statement is working correctly, but here is my problem. If you look at the 2nd iframe code, you will notice that it is different from the first because it contains "transaction_id=" and the "tid" value is supposed to echo there, but the php if statement is displaying the hard coded iframe code BEFORE it is able to echo the tid value into the iframe's "transaction_id" area.
Any ideas how I can use the php if statement and also make the echo inside of the 2nd iframe work correctly?
Thanks for the help.