I have created two test pages.
http://www.scenicradio.com/index.php?id=test-test-test
and
http://www.scenicradio.com/index.php...t-test-uno-uno
The first page contains a properly formatted link as per your information:
<a href="http://www.scenicradio.com/index.php?id=test-test-uno-uno&ytid=SHoHIL2ABVQ">Test</a>
and
The second page contains embed code for a youtube player.
<!--?php
if(!isset($_GET['ytid']){
echo "No Video here!";
} else {
$ytid = $_GET['ytid'];
?-->
<p><iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/<?php echo $ytid; ?>" width="560"></iframe><!--?php
}
?--></p>
When I click on the link embedded on the first page - the following happens:
The youtube id is being displayed in the url.
The second youtube embed page is accessed and displayed.
However
The youtube id is not interacting with the PHP script - and the youtube video is not loading.
The following youtube error message displays on the youtube embed page - "An error occured, please try again later. LEARN MORE".
I inspect the HTML code on the youtube embed page - and there is no youtube ID present in the embed code displayed in the web browser.
<div class="page-text"> <?php if(!isset($_GET['ytid']){ echo "No Video here!"; } else { $ytid = $_GET['ytid']; ?> <iframe width="560" height="315" src="http://www.youtube.com/embed/<?php echo $ytid; ?>" frameborder="0" allowfullscreen></iframe> <?php } ?>
What am I doing wrong ?