edot Posted November 10, 2009 Share Posted November 10, 2009 Hi, I have created this page that should play a video from a remote folder and also display other details about the video (eg. Author, Description, Date). When i Use this code it stops the page from loading fully and also shows no video or video name. When i delete the while loop in the middle the page loads. But still no PHP elements. Can you give me some advice or point me in the right direction? <?php require("connection.php"); $thevid = $_GET['u']; $db = mysql_query("SELECT * FROM videos WHERE title = '$thevid'"); // use the defined username to filter the SELECT statement - should only come out with 1 result ?> <div id="bodyPanel"> <table width="900"> <tr> <td width="600"> <h1> <? while($details = mysql_fetch_array( $db )){ echo $details['title']; ?> </h1> <p> <OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" WIDTH="600" HEIGHT="300" > <PARAM NAME="src" VALUE=" <? echo $thevid; ?> "> <PARAM NAME="autoplay" VALUE="true" > <EMBED SRC="QTMimeType.pntg" TYPE="image/x-macpaint" PLUGINSPAGE="http://www.apple.com/quicktime/download" QTSRC=" <? echo $thevid; ?> " WIDTH="600" HEIGHT="300" AUTOPLAY="true" > </EMBED> </OBJECT> </p> <h2>Comments</h2> </td> <td width="300"> <h2>Uploaded by</h2> Author: <? echo $details['author']; ?> <br /><br /> Date: <? echo $details['date']; ?> <br /><br /> Description: <? echo $details['title']; ?> <br /><br /> <h2>Related Videos</h2> <? } ?> <p> </p> </td> </tr> </table> </div> Link to comment https://forums.phpfreaks.com/topic/181026-php-video-page/ Share on other sites More sharing options...
mikesta707 Posted November 10, 2009 Share Posted November 10, 2009 I see nothing glaringly terrible, except that you are using short php tags. Also, you should sanitize your input. Link to comment https://forums.phpfreaks.com/topic/181026-php-video-page/#findComment-955109 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.