Trying to launch my flash videos by passing their URL listed in a field on MYSQL via PHP script. Any help is greatly appreciated.
1) I am able to launch the video referenced directly in main page...for example:
launch_video.ph p
and 2) I can print the URL as output from server via PHP script...for example:
launch_video.ph p
(where the 'link' value from database in this case is "http://.../embedded_flash_ video.html")
send_link.php:
But I do not know how to update the PHP script to pass the URL (link) for the selected id in the proper manner (with the result of launching the video as in #1 above) as opposed to printing the URL (link) when the href is clicked.
Thanks
1) I am able to launch the video referenced directly in main page...for example:
launch_video.ph p
Code:
printf("Movie %s: <a href='http://.../embedded_flash_video.html'>%s</a>
launch_video.ph p
Code:
printf("Movie %s: <a href='send_link.php?id=%s'>%s</a>
send_link.php:
Code:
<?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 pass the URL (link) for the selected id in the proper manner (with the result of launching the video as in #1 above) as opposed to printing the URL (link) when the href is clicked.
Thanks
Comment