I have a search function, that searches for youtube videos and display them on my front page. Just like YouTube I want to have another page on my site, so that when they click on a video, it takes them to a new page and display the video there – still part of my website.
I have a search.php where you can make the search and a video.php where you should be able to watch a video.
I had this on my video.php:
<a href='video.php?var=$video_id['v']'>Data link</a>
$video_id[‘v’] = contains the url of the youtube page.
and on my video.php I have:
<?php
echo $_GET['var'];
?>
the value of var is equal to “var”. not the URL I was suppose to get. do you know what should I do?
1 Answer