PHP MySQL works in a non frame doc, but not in a frame doc?
Posted: Sun Mar 28, 2004 11:43 am
I have some code that dynamically gets a variable from the previous page, then goes to the correct directory and grabs the appropriately named swf file and works great. But I wanted to rebuild the page in a frame for several reasons, but now the php code is blank for the directory and the swf name?
The url from the previous page is as follows:
http://www.mytownsavings.com/template/g ... =eri000544
PHP is working, I tried a few tests, but this specific code just drops out:
Also, the middle frame goes to the database and grabs all offers, if any, and displays them. This is now not working elther?
Any suggestions would be greatly appreciated.
Thanks,
Don
The url from the previous page is as follows:
http://www.mytownsavings.com/template/g ... =eri000544
PHP is working, I tried a few tests, but this specific code just drops out:
Code: Select all
<?
$dbHost = "xxx";
$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="800" height="325">
<param name="movie" value="../template/dir/<? print $_GET["merchant"]."/".$_GET["merchant"]."."."swf"; ?>" >
<param name="quality" value="high">
<embed src="../template/dir/<? print $_GET["merchant"]."/".$_GET["merchant"]."."."swf"; ?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="800" height="325"></embed>
</object>Any suggestions would be greatly appreciated.
Thanks,
Don