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>
Member Avatar for diafol

First of all, you're using short tags (<? instead of <?php). CHeck to see if your server supports them.

find "short_open_tag" under phpinfo(); and see if it's set to ON.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.