Wednesday, November 3, 2010

Display selected youtube videos using PHP



<html>
<head>
<title>Select Lady Gaga music from youtube</title>
</head>
<h1> Select Lady Gaga music from youtube</h1>
<body>
<?php $vid="EVBsypHzF3U"; ?>
<form name="myform" action="<?php $vid=$_POST['youtube']; ?>"  method="POST">
<input type="radio" name="youtube" value="EVBsypHzF3U" CHECKED /> Lady Gaga - Telephone ft. Beyoncé <br />
<input type="radio" name="youtube" value="qrO4YZeyl0I" /> Lady Gaga - Bad Romance <br>
<Input type = "Submit" Name = "Submit1" VALUE = "Select Video from a Radio Button">
</form>
<object width="650" height="600"><param name="movie" value="http://www.youtube.com/v/<?php echo $vid; ?>">
</param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/<?php echo $vid; ?>"
type="application/x-shockwave-flash" wmode="transparent" width="650" height="600"></embed></object>
</body>
</html>
The results can be seen from HERE

No comments:

Post a Comment