[FX.php List] only showing 1st image from container field in
foreach loop
Alex Gates
alex at gandrpublishing.com
Thu Aug 24 13:36:41 MDT 2006
I am having a problem with displaying images from a container field. It
will display the 1st one with no problem, but the others aren't making
the trip. (I'm using foreach to go through my found set) When I view
the source of my page I see that the URL is being made through
imageproxy, but for some reason, no images besides the one in the first
record will display. All the text displays wonderfully - but for some
reason, only the 1st image comes through.
Have any of you had this problem?
Here is the code for my page - -
<?php
ob_start();
?>
<!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>
<?php
include_once('FX/FX.php');
include_once('FX/server_data.php');
include_once('FX/FMErrors.php');
include_once('FX/image_proxy.php');
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title>Cookbooks For Sale</title>
<style type="text/css">
<!--
.style6 {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
}
.style7 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
}
-->
</style>
</head>
<?php
$lookup=new FX($serverIP,$webCompanionPort,'FMPro7');
$lookup->SetDBData('cbsale.fp7','ToWeb', "all");
$lookup->SetDBPassword("XXXXXXXX",'XXXXXXXXXX');
$lookup->AddDBParam('Status', "Online", 'eq');
$lookupResult=$lookup->FMFind();
$foundResult=$lookupResult['foundCount'];
echo $foundResult;
echo '<br>';
echo $lookupResult['errorCode'];
?>
<body>
<table width="608" border="0" align="right" cellpadding="2"
cellspacing="1" valign="top">
<?php
$i = 0;
foreach( $lookupResult['data'] as $key => $searchData ){
?>
<?php
if ($i == 0) {
print "<tr>\n";
}
?>
<td width="50" height="186" valign="top">
<img src="FX/image_proxy.php?FXimage=<? echo
vignereEncryptURL($searchData['Cover'][0]); ?>" border=1><br />
<?php
echo $searchData['CSSForWeb'][0];
?></td>
<?php
$i = ($i + 1) % 3;
if ($i == 0) {
print "</tr>\n";
}
?>
<?php
}
?>
</table>
</body>
</html>
Thanks for your help - - I'm stumped!
Alex P. Gates
More information about the FX.php_List
mailing list