Hi, i'm very new to php and on my first project from the books.
I'm using LAMP to make this movie collection database, which is proceeding fine, however i 'm having problems pasing the trailer variable into <object> html tags.
All i see is the media player.
The codes are as follows;
$num_results = $result->num_rows;
echo '<p>Number of films found: '.$num_results.'</p>';
for ($i=0; $i <$num_results; $i++)
{
$row = $result->fetch_assoc();
echo '<br />Film Number: ';
echo stripslashes($row['filmid']);
echo '<p><strong>'.($i+1).'. Title: ';
echo htmlspecialchars(stripslashes($row['title']));
echo '</strong><br />Star 1: ';
echo stripslashes($row['star1']);
echo '<br />Star 2: ';
echo stripslashes($row['star2']);
echo '<br />Synopsis: ';
echo stripslashes($row['synopsis']);
echo '<br />Genre: ';
echo stripslashes($row['genre1']);
echo '<br />Rating: ';
echo stripslashes($row['rating']);
echo '<br />Poster: ';
$img = $row['image'];
echo "<br /><img src=\"$img\">";
echo '<br />View Trailer: ';
$tra = $row['trailer'];
/*echo "<br /><a href=\"$tra\">Play the trailer</a>";*/
echo '<br /><OBJECT
ID="mediaPlayer"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
CODEBASE="http://activex.microsoft.com/activex/
controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
STANDBY="Loading Microsoft Windows Media Player components..."
TYPE="application/x-oleobject">
<PARAM NAME="fileName"
VALUE="<?php echo $tra ?>"
<PARAM NAME="animationatStart" VALUE="true">
<PARAM NAME="transparentatStart" VALUE="true">
<PARAM NAME="autoStart" VALUE="true">
<PARAM NAME="showControls" VALUE="true">
<EMBED type="application/x-mplayer2"
pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/"
SRC="<?php echo $tra ?>"
name="MediaPlayer1"
width=352
height=240
AutoStart=true>
</EMBED>
</OBJECT>';
echo '</p>';
}
$result->free();
$db->close();
?>
</body>
</html>
Appreciate any help
Thanks