Hi,
I must have something terribly wrong with the code. The
bannerimg fecthing PHP follows at the end of this posting... (the
problem is probably there, but I cannot see it with my very vague
understanding of PHP, which relies 99,9% on DW generated code). The
page where the img should appear has "Banner" DIV, and the CSS
tries to fetch the Background-image using that PHP script. The
script shows the test img nice and ok, when run on its own with IE,
but actually with firefox it gets another result.... It's very
frustrating since the problem is probably very very small :D, or
maybe, the whole combination is faulty??
<?php require_once('Connections/connElektra3.php'); ?>
<?php
header('Content-type: image/jpeg');
// Load the tNG classes
require_once('includes/tng/tNG.inc.php');
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType,
$theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue)
: $theValue;
$theValue = function_exists("mysql_real_escape_string") ?
mysql_real_escape_string($theValue) :
mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" :
"NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) .
"'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" :
"NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue :
$theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_connElektra3, $connElektra3);
$query_rs_bannerbg = "SELECT img_name FROM bannerimages";
$rs_bannerbg = mysql_query($query_rs_bannerbg, $connElektra3)
or die(mysql_error());
$row_rs_bannerbg = mysql_fetch_assoc($rs_bannerbg);
$totalRows_rs_bannerbg = mysql_num_rows($rs_bannerbg);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<p><img src="<?php echo tNG_showDynamicImage("",
"img/banners/", "{rs_bannerbg.img_name}");?>" />
</p>
</body>
</html>
<?php
mysql_free_result($rs_bannerbg);
?>