Displaying youTube iframes stored in mySQL
I'm trying to display youTube videos on a page. the code is stored in a
mySQL database.
I'm a real dummy when it comes to this. If anyone asks me to make an
informed decision about changing the code I will not know what to do. I'm
basically the copy and paste type so I'll be very grateful if someone can
give me a corrected code. I'm sure the flaw is big as a bull but hey I'm a
bit short-sighted at this!
I'm using this code. I'm not getting error messages or anything for that
matter. Just a blank page.
Thanks!!
Eugenie
This is the code I'm using:
<?php
$DBhost = "localhost";
$DBuser = "----";
$DBpass = "----";
$DBName = "----";
$table = "----";
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to
database");
@mysql_select_db("$DBName") or die("Unable to select database $DBName");
$results = mysql_query($sqlquery);
$clip1 = $row["clip1"];
$clip2 = $row["clip2"];
$clip3 = $row["clip3"];
$clip4 = $row["clip4"];
echo "<iframe src=\"{$clip1}\" style=\"background: #fff;\"
frameborder=\"0\" height=\"300\" scrolling=\"auto\"
width=\"480\"></iframe>";
echo "<iframe src=\"{$clip2}\" style=\"background: #fff;\"
frameborder=\"0\" height=\"300\" scrolling=\"auto\"
width=\"480\"></iframe>";
echo "<iframe src=\"{$clip3}\" style=\"background: #fff;\"
frameborder=\"0\" height=\"300\" scrolling=\"auto\"
width=\"480\"></iframe>";
echo "<iframe src=\"{$clip4}\" style=\"background: #fff;\"
frameborder=\"0\" height=\"300\" scrolling=\"auto\"
width=\"480\"></iframe>";
?>
No comments:
Post a Comment