Loading videos according to link...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
schumacher_is_god
Forum Newbie
Posts: 1
Joined: Sun Jul 13, 2008 8:11 am

Loading videos according to link...

Post 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:
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: Loading videos according to link...

Post 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>
<? } ?>
 
Post Reply