I am trying to get embed the filename of a SWF file dynamically. The issue I am having is not the dynamics, but mixing the HTML - PHP - SWF info. I am getting the variable from a REQUEST from the URL and that variable is the name of the SWF I want to display. Here is my code so far:
Code: Select all
<?
$dbHost = "xxx.xxx.net";
$dbName = "xxx";
$dbUser = "xxx";
$dbPass = "xxx";
$connmts = mysql_connect($dbHost, $dbUser, $dbPass) or trigger_error(mysql_error(),E_USER_ERROR);
$link = @mysql_connect($dbHost, $dbUser, $dbPass);
if (!$link){
$errorMsg = "Could not connect to server";
print "&result=Fail&errorMsg=$errorMsg";
exit;
}
if (!@mysql_select_db($dbName)){
$errorMsg = "Could not select $dbName database";
print "&result=Fail&errorMsg=$errorMsg";
exit;
}
$hold = $_REQUEST['merchant'];
'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="640" height="260">
<param name="movie" value="/images/$hold.swf">
<param name="quality" value="high">
<embed src="/images/$hold.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="640" height="260"></embed>
</object>
<br>'
?>It orignally had the filename in it and I made it dynamic. I know that this boils down to mixing PHP and HTML, but I am still a little grey in this area.
Thanks in advance,
Dmacman