• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Uload a video file of any format and store it i database

Ok, i got it and i wrote the following code in Main page for form submit:

<form method="post" action="test_video_action.php">
YouTube ID: <input type="text" name="YouTubeID" />
<input type="submit" name="submit" value="submit" />

and in action page for only show the video the code is:

//echo $_POST["YouTubeID"];
&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/&lt;?php echo $_POST["YouTubeID"]; ?&gt;"> </param>
&lt;embed src="http://www.youtube.com/v/&lt;?php echo $_POST["YouTubeID"]; ?&gt;" type="application/x-shockwave-flash" width="425" height="350"&gt; &lt;/embed&gt; &lt;/object&gt;
&lt;?php } ?&gt;

Now my question is if the link of an you tube video is "http://www.youtube.com/watch?v=gIbIO4p8ff4&feature=related" then when i passing only the id after "v=" the video shows correctly. But, when i passing the total link in the form it didn't show the video...

can you please give me a solution for both link post, i.e. a user can post only the ID after "v=" or can post the total you tube link and the video play.

Messages In This Thread
Uload a video file of any format and store it i database - by El Forum - 07-03-2012, 12:36 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.