By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,747 Members | 2,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,747 IT Pros & Developers. It's quick & easy.

playing movie file

chelvan
P: 90
hi all

Expand|Select|Wrap|Line Numbers
  1.  
  2.                     <! -- Google Video HTML Code -- >
  3.                     <embed style='width:400px; height:326px;' id='VideoPlayback' 
  4.                     align='middle' type='application/x-shockwave-flash' 
  5.                     src='http://video.google.com/googleplayer.swf?videoUrl=player'
  6.                     allowScriptAccess='sameDomain' 
  7.                     quality='best' bgcolor='#ffffff' scale='noScale' 
  8.                     wmode='window' salign='TL' FlashVars='playerMode=embedded'>
  9.                     </embed>
  10.                     <! -- End of Google Video HTML Code -->
  11.  
  12.  
the above code for display a googleplayer on my site. i collect the src by query from database, & i stored them into a combo box.

that follows bellow

Expand|Select|Wrap|Line Numbers
  1. <select name='player'><option>Select</option>
  2. //while loop start 
  3. <option value='myvids/$al_pa[$al_c]'>$al_uf[$al_c]</option>
  4. //while end
  5. </select>
  6.  

now i want to play the selected movie file on the combobox. but it couldn't work. is any errors on the code?


thanks
chel-1
Oct 3 '08 #1
Share this Question
Share on Google+
4 Replies


Markus
Expert 5K+
P: 6,050
How are you passing the select box value? POST or GET?
Oct 3 '08 #2

Atli
Expert 5K+
P: 5,058
now i want to play the selected movie file on the combobox. but it couldn't work. is any errors on the code?
Well yes. For one, that isn't PHP code. It's HTML with a couple of C style single line comments and two PHP variables that aren't inside a PHP block.

If that is your actual code, then there is your problem.
If it isn't, we would need to see the actual code to be able to help.
Oct 4 '08 #3

chelvan
P: 90
hi
sorry for my late. here its my code.

Expand|Select|Wrap|Line Numbers
  1. if ($att=="Video"){
  2.  
  3.             $query2=" SELECT * FROM albumvideo where albumid='$a_ref'";
  4.             $result2=mysql_query($query2);
  5.             echo mysql_error();
  6.             $nume=mysql_num_rows($result2);//break 
  7.  
  8.             echo "<br><br><select name='player'  onchange='PlayIt(this.value)'><option>Select</option>";
  9.                 $sql_selobj=mysql_query("SELECT * FROM albumvideo WHERE albumid='$a_ref' ");//limit $eu, $limit
  10.                 while($row=mysql_fetch_array($sql_selobj)){
  11.                     $obj_num=$row['objectno'];
  12.                     $al_id[$al_c]=$row['albumid'];
  13.                     $al_des[$al_c]=$row['description'];
  14.                     $al_name[$al_c]=$row['name'];
  15.                     $al_pa[$al_c]=$row['path'];
  16.                     $al_uf[$al_c]=$row['userfile'];
  17.  
  18.                     echo"<option value='myvids/$al_pa[$al_c]'>$al_uf[$al_c]</option>";
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                     $al_c=$al_c+1;
  25.                     }
  26.                     echo"</select>";
  27.                     echo"<br><br><table align='center' height='300'><tr><td valign='middle'>";
  28.  
  29.                     echo<! -- Google Video HTML Code -- >
  30.                     <embed style='width:400px; height:326px;' id='VideoPlayback' 
  31.                     align='middle' type='application/x-shockwave-flash' 
  32.                     src='http://video.google.com/googleplayer.swf?videoUrl=player'
  33.                     allowScriptAccess='sameDomain' 
  34.                     quality='best' bgcolor='#ffffff' scale='noScale' 
  35.                     wmode='window' salign='TL' FlashVars='playerMode=embedded'>
  36.                     </embed>
  37.                     <! -- End of Google Video HTML Code -->";
  38.  
is any code for replace this one.

thanks
chel-1
Oct 7 '08 #4

pbmods
Expert 5K+
P: 5,821
Heya, chel-1.

Is your script generating any Javascript errors? Can you verify that PlayIt() is getting called?
Oct 9 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.