immunity Posted May 21, 2007 Share Posted May 21, 2007 hi i try to create a youtube player window in my page via php (a field in the data contains the link) althought $row return the correct link it dont create me the Youtube player window my code: <?php $con = mysql_connect("localhost","******","*****"); if (!$con) { echo "<img src=\"Design/topmoviefault.bmp\" />"; } mysql_select_db("labdb2_19", $con); $result = mysql_query('Select * from movie , top_movie where movie.title = top_movie.title'); while ($row = mysql_fetch_array($result)) { echo $row['youtube']; echo "<object width=\"425\" height=\"350\"><param name=\"movie\" value=\"".$row['youtube']."\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"".$row['youtube']."\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"350\"></embed></object>"; } ?> my results :http://195.251.111.53/~labdb219/test67.php anyone knows why is happening this ? how i could correct this fault ? Link to comment https://forums.phpfreaks.com/topic/52402-trying-to-load-youtube-via-link-that-is-inside-my-data-base-through-php/ Share on other sites More sharing options...
john010117 Posted May 22, 2007 Share Posted May 22, 2007 Put: extract($row); after: while ($row = mysql_fetch_array($result)) Link to comment https://forums.phpfreaks.com/topic/52402-trying-to-load-youtube-via-link-that-is-inside-my-data-base-through-php/#findComment-258690 Share on other sites More sharing options...
immunity Posted May 22, 2007 Author Share Posted May 22, 2007 Put: extract($row); after: while ($row = mysql_fetch_array($result)) Thanks for Reply ! Did it but no result again (sorry i didnt use |code| |code|) My codee now is <?php $con = mysql_connect("localhost","labdb2_19","2004040"); if (!$con) { echo "<img src=\"Design/topmoviefault.bmp\" />"; } mysql_select_db("labdb2_19", $con); $result = mysql_query('Select * from movie , top_movie where movie.title = top_movie.title'); while ($row = mysql_fetch_array($result)) { [b]extract($row);[/b] echo $row['youtube']; echo "<object width=\"425\" height=\"350\"><param name=\"movie\" value=\"".$row['youtube']."\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"".$row['youtube']."\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"350\"></embed></object>"; } ?> and exist only in this post thought it would bold this part of code my results : http://195.251.111.53/~labdb219/test67.php Link to comment https://forums.phpfreaks.com/topic/52402-trying-to-load-youtube-via-link-that-is-inside-my-data-base-through-php/#findComment-258740 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.