Code below was supposed to play all the videos in the db
but only shows the quicktime player but does not plays it
[code=php]<?php
$con = mysql_connect(“localhost”,”root”,””);
if(!$con)
die(mysql_error());
if(!mysql_select_db(sgw))
die(“cant connect db”);
$query = “select name from video order by id desc”;
$result = mysql_query($query);
$num = mysql_num_rows($result);
if($num == 0)
{
echo ‘<script type=”text/javascript>
<!–
alert(“No Video Available, Why dont you post some.”);
document.location=”../test/upload.php”;
–>
</script>’;
}
while($row=mysql_fetch_array($result))
{
echo ‘
<object width=”400″ height=”320″
classid=”clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B”
codebase=”http://www.apple.com/qtactivex/qtplugin.cab”>
<param name=”src” value=”‘ . $row[‘name’] . ‘”>
<param name=”autoplay” value=”true”>
<param name=”controller” value=”false”>
<embed src=”‘ . $row[‘name’] . ‘” width=”400″ height=”320″
autoplay=”true” controller=”true”
pluginspage=”http://www.apple.com/quicktime/download/”>
</embed>
</object><br/> ‘;
}
?>