Jump to content

Trying to load youtube via link that is inside my Data Base through PHP


immunity

Recommended Posts

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
Share on other sites

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 :P thought it would bold this part of code :P

 

my results : http://195.251.111.53/~labdb219/test67.php

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.