ZYWIEC ZYWIEC - 6 months ago 12
HTML Question

Replace iframe video player with link to target page

I would like to modify my current code so that instead of the whole player, display only link to it. Does anyone have an idea how to do it? I have something like this:

<iframe src="http://www.youtube.com/embed/<?php echo $_GET['id']; ?>" style="border: 0; width: 100%; height: 360px;" frameborder="0" scrolling="no"></iframe>


And I want something like this:

"U can watch this here: http://www.youtube.com/watch?v=<?php echo $_GET['id']; ?>"

Answer

You can make a "link" with an "anchor" (<a>) tag. Something like this:

U can watch this here: <a href="http://www.youtube.com/watch?v=<?php echo $_GET['id']; ?>">http://www.youtube.com/watch?v=<?php echo $_GET['id']; ?></a>

Or simply:

U can watch this here: <a href="http://www.youtube.com/watch?v=<?php echo $_GET['id']; ?>">Click here!</a>