I'm wondering is it possible to echo out an entire media player, such as windows media player,in a similar method to echoing out all other tags such as tables and divs?
The code i want to echo out, only if certain variables dictate, is this:
<OBJECT id='mediaPlayer' width="300" height="250"
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 $videolocation; ?>">
<param name='animationatStart' value='true'>
<param name='transparentatStart' value='false'>
<param name='autoStart' value="false">
<param name='showControls' value="true">
<param name='loop' value="false">
<EMBED type='application/x-mplayer2'
pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1'
bgcolor='darkblue' showcontrols="true" showtracker='-1'
showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="300" height="250"
src="<?php echo $videolocation; ?>" autostart="true" designtimesp='5311' loop="true">
</EMBED>
</OBJECT>
I have tried putting it all inside an echo statement such as:
if(strlen($variable1)>2)
{
echo "
//The whole script!
";
}
This doesn't work and was wishful thinking on my part; any suggestions would be very much appreciated.