I am trying to make a project that will play a file by getting the name of the file from a database, and adding it to the end of a constant path. I am sending the name of the file with the URL to the playback page. I have the player embeded but i keep getting errors that seem to be related to the variable containing the path and the variable containing the file name....here's the code:
<html>
<body >
<script language="javascript">
function playIt(){
var Whos = "<?=$what?>";
var WHAT = "C:\Documents and Settings\Player\";
Player.URL = "WHAT" + "Whos" ;
Player.controls.play();}
function stop() {
mePlayer.controls.stop();}
</script>
<?php
// get the id from the URL request
$who = $_REQUEST['who']; //example of who is beachtrip.asfv where
$long = strlen($who); //v indicates the table the video is from
$Where = substr($who,$long-1);
$what = substr($who,0,$long-1);
?>
<table width="100%" height="100%">
<tr>
<td align="left" valign="bottom" colspan="2">
<form name="medForm" action="">
<input type="button" onclick="playIt()" value="PLAY"> 
<input type="button" onclick="stop()" value="STOP">
</form>
</td>
</tr>
<tr>
<td colspan="2" style="font-family:verdana;font-size:8pt;" align="center">
<OBJECT id='mePlayer' width="600" height="450"
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="">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="loop" value="false">
</OBJECT>
</td>
</tr>
</table>
</body>
</html>
I am getting an unterminated string constant error when the page loads as well as object expected errors when play and stop are clicked.
I have no idea what I am doing wrong or where the error is at. I would be greatful for any help