Solar Posted April 12, 2010 Share Posted April 12, 2010 I would love to create a simple coding that will allow users on my website to post their videos and allready be embed with an output source Form: <h2 class="title">Submit Youtube Video</h2> <p><form action="insert.php" method="post"> Channel Name: <span class="style1">(Channel name of the video you are posting, this will keep submitted videos more organized) </span><br /> <input name="channel" type="text" size="50" /> <br /> Title of Video: <br /> <input name="title" type="text" size="50" /> <br /> URL:<br /> <input name="url" type="text" size="50" /> <br /> Category: <span class="style1">(Please insert the type of category well suited) </span><br /> <select size="1" input name="categories"> <option>Autos Vehicles</option> <option>Comedy</option> <option>Education</option> <option>Entertainment</option> <option>Film Animation</option> <option>Gaming</option> <option>Howto Style</option> <option>Music</option> <option>News Politics</option> <option>People Blogs</option> <option>Pets Animals</option> <option>Science Technology</option> <option>Sports</option> <option>Travel Events</option> <option>Shows</option> <option>Movies</option> <option>Contests</option> <option>Events</option> </select> <input name="name" type="hidden" size="50" value="<?php echo "$session"; ?>"/> <br /> <input type="submit" value="Submit Video" /> </form> Output: $sql = "SELECT * FROM info WHERE channel = '" . htmlspecialchars($_GET["name"]) . "' LIMIT $offset, $rowsperpage"; $result = mysql_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR); // while there are rows to be fetched... while ($list = mysql_fetch_assoc($result)) { // echo data echo $list[''] . "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"100%\"> <tr> <td width=\"50%\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"100%\"> <tr> <td width=\"100%\"><a href=\"watch.php?name=" . $list['title'] . "\">" . $list['title'] . "</a><br>Channel: <a href=\"channel.php?name=" . $list['channel'] . "\">" . $list['channel'] . "<br></a>Submitted By: <a href=\"userinfo.php?user=" . $list['name'] . "\">" . $list['name'] . "</a></td> <td width=\"70\" align=\"right\"><img border=\"0\" src=\"http://i1.ytimg.com/vi/" . $list['url2'] . "/1.jpg\"></a></td> </tr> </table> </td> </tr> </table><hr color=\"#C0C0C0\" size=\"1\">"; } This is what I would love to do. While a user submits a URL video for example; To the database row URL. Is is possible to when the user submits the link in the INPUT Code to take uImk2RgCq_U From the URL and copy it to database row URL2. So end results idnamechanneltitleurlurl2categories 1SubmittedByMyWebsite'sUsername1nterwebsThe 20 oldest Videos ever on Youtube uImk2RgCq_UEntertainment Thanks for your help! Link to comment https://forums.phpfreaks.com/topic/198311-video-submission/ Share on other sites More sharing options...
Jax2 Posted April 12, 2010 Share Posted April 12, 2010 can't you just embed the code with the full URL given? <embed source="<?php echo $row['url'];?>"> </embed> Or something to that extent? Link to comment https://forums.phpfreaks.com/topic/198311-video-submission/#findComment-1040556 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.