Page 1 of 1

Loading videos according to link...

Posted: Sun Jul 13, 2008 8:17 am
by schumacher_is_god
Hi guys

I'm new to this forum and fairly new to PHP.
What I'm trying to do here is create a page that shows videos that change according to the link chosen from the list to the side of the page.
So, rather than creating a page for each video, I just wanna be able to dump the videos into the folder, upload the links into a database (I have that bit working) and then dynamically create links (again, this works), and then the video to load according to the link.
I'm not sure I've explained myself very well, but any help would be greatly appreciated. :mrgreen:

Re: Loading videos according to link...

Posted: Sun Jul 13, 2008 8:47 am
by yacahuma
just make your links go to the same page and handle the input data you are sending
video.php

Code: Select all

 
<?
$video_url =  (isset($_GET['video_url])) ? $_GET['video_url] : 'http://www.domain.com/video1.mpg';//some default video
//show video
} 
 
//load video data from database and create links to video.php
foreach ($data  as $video_data)
{?>
  <br /><a href="video.php?video_url=<?=$video->data->video_link?>"><?=$video_data->video_name?></a>
<? } ?>