[eluser]rash[/eluser]
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" />
</form>
and in action page for only show the video the code is:
<?php
$action=$_REQUEST['submit'];
if($action=="submit"){
//echo $_POST["YouTubeID"];
?>
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/<?php echo $_POST["YouTubeID"]; ?>"> </param>
<embed src="http://www.youtube.com/v/<?php echo $_POST["YouTubeID"]; ?>" type="application/x-shockwave-flash" width="425" height="350"> </embed> </object>
<?php } ?>
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.