It'll be something like this yo: <form action="" method="POST"> Youtube link plz: <input type="text" name="poop" /> </form> <?php if(isset($_POST['poop'])) { $youtube = $_POST['poop']; $lol = explode("watch?v=", $youtube); hallooo($lol[1]); } function hallooo($wuutt) { echo "<textarea cols=\"150\" row=\"100\"> <object type=\"application/x-shockwave-flash\" style=\"width:425px; height:344px;\" data=\"http://www.youtube.com/v/$wuutt\"> <param name=\"movie\" value=\"http://www.youtube.com/v/$wuutt\" /> </object></textarea>"; } ?> PHP: