Need Help: Launch embedded video via server side PHP script

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
Molecule
Forum Newbie
Posts: 2
Joined: Sat Mar 29, 2008 11:39 pm

Need Help: Launch embedded video via server side PHP script

Post by Molecule »

I am attempting to launch my flash videos from variable URL referenced on a server. Any help is greatly appreciated.

1) I am able to launch the video referenced directly...for example:

Code: Select all

printf("Movie %s: <a href='http://.../embedded_flash_video.html'>%s</a>
and 2) I can print the URL as output from server via PHP script...for example:

Code: Select all

printf("Movie %s: <a href='launch_movie.php?id=%s'>%s</a>
(where the 'link' value is "http://.../embedded_flash_video.html")


launch_movie.php:

Code: Select all

<?php
 
//.........connect....
 
  $id = mysql_real_escape_string($_GET['id']);
 
  $query = "SELECT id, movie, link FROM vid WHERE id='$id'";
 
  $result = mysql_query($query);
 
  // If results are found, output them
  if (mysql_num_rows($result) > 0) {
 
    $row = mysql_fetch_array($result);
 
    // Convert HTML entities prior to displaying
    printf("%s", (htmlentities($row['link'])));
 
 
  } else {
    printf("Failed");
  }
 
?>
But I do not know how to update the PHP script to simply launch the URL (link) for the selected id (with the result of launching the video as in #1 above) as opposed to printing the URL (link) when the href is clicked.

Thanks
Molecule
Forum Newbie
Posts: 2
Joined: Sat Mar 29, 2008 11:39 pm

Re: Need Help: Launch embedded video via server side PHP script

Post by Molecule »

bump
Post Reply