[FX.php List] only showing 1st image from container field in
foreach loop
Chris Hansen
chris at iViking.org
Fri Aug 25 11:46:14 MDT 2006
Alex,
It seems like I've heard of this problem cropping up before, though I
don't remember the solution. That said, have you tested this across
various platforms and/or browsers? It seems to me that this could be
the result of the browser ignoring the GET parameter passed to the
image, and just displaying the same one repeatedly. If that were the
case, I'd assume differing behaviors among browsers. Let me know
what you come up with. Best,
--Chris Hansen
FileMaker 7 Certified Developer
Creator of FX.php
"The best way from FileMaker to the Web."
www.iViking.org
On Aug 24, 2006, at 1:36 PM, Alex Gates wrote:
> 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
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
More information about the FX.php_List
mailing list