[FX.php List] Using an image in a container

Laura Long laural at ultimate-products.com
Fri Apr 21 11:36:41 MDT 2006


Thanks for helping me with this Andy.  I changed my code a bit to make
it less confusing for myself, and this is what I have:
 
foreach($imageResult['data'] as $key=>$imageData){
 
$clientLogo="FX/image_proxy.php?FXimage=".vignereEncryptURL($imageData['
logo'][0]); 
 
echo "<img src=\"".$clientLogo."\">";
 
 } 
 
logo is the name of my container field.  I am still getting the Red X
(no graphic) icon, but I think I am getting closer as my view Source
code looks like this:
 
<img
src="FX/image_proxy.php?FXimage=%BA%EF%FD%FDT%B9E%AC%D6%DE%B8V%F1%D7%C0%
A8%CF%D8%404%7B%98%CD%9F%E8%3FO%8F%E3.%CBaAz%8E%28ry%B4%E6%FC%DD%F4fK%8B
%94%B4%2C%8A%F4%D1L%C7%F9%A6.%8B%EEG%D6%3F%F0%5DY2%C7B%C7r%DFa%2CP1V%B5%
FE%EEV%27%A8%25%99%9B%D2">
 
I did not get the full encrypt key before...
 
I appreciate your help so much,  I don't know where the error lies, does
anyone see anything that jumps out at them?  I would appreciate any help
offered - thanks again  :)
 
 

Laura Long
Database/Web Designer


-----Original Message-----
From: Andy Gaunt [mailto:andy at fmpug.com] 
Sent: Thursday, April 20, 2006 4:06 PM
To: laural at ultimate-products.com; 'FX.php Discussion List'
Subject: RE: [FX.php List] Using an image in a container



Laura,

 

You need to reference the image container field from your returned array
as opposed to the FX query. 

 

$clientLogo
="FX/image_proxy.php?FXimage=".vignereEncryptURL($logoData[logo][0]);

 

 

$logo is your FX query

$logoResult is the resulting array returned by FileMaker

 

Then you display the 'data' portion of the array from the $logoResult as
$logoData

Andy Gaunt
T: 407.810.4722
andy at fmpug.com
http://www.fmpug.com <http://www.fmpug.com/>     

Recipient of FileMaker's 2005 "Mad Dog" Public Relations Award

For chapter locations, dates & times please visit the website at
http://www.fmpug.com <http://www.fmpug.com/>  If you can make it to a
meeting, please RSVP at http://www.fmpug.com/rsvp.php


  _____  


From: Laura Long [mailto:laural at ultimate-products.com] 
Sent: Thursday, April 20, 2006 3:59 PM
To: andy at fmpug.com; 'FX.php Discussion List'
Subject: RE: [FX.php List] Using an image in a container

 

Thanks so much for the response I want to make sure I tried your
suggestion correctly, I still can't get the image to render.  This is
what I have now (the name of the container field is logo - 

 

<?php
require_once('FX/image_proxy.php');
include_once('FX/FX.php');
include_once('FX/server_data.php');
include_once('FX/FMErrors.php');

 

$logo=new FX($serverIP,$webCompanionPort,'FMPro7');
$logo->SetDBData('myDatabase.fp7','myLayout');
$logo->SetDBPassword('password','myPassword);
$logo->AddDBParam('idCompany',$_SESSION['idCompany']);
$logoResult=$logo->FMFind();

 

foreach($logoResult['data'] as $key=>$logoData){

 

$clientLogo="fx/image_proxy.php?FXimage=".vignereEncryptURL($logo);

 

echo "<img src=\"".$clientLogo."\">";

 } 


?>

 

I still get the image not found box, here is the code from the view
source - 

 

<img src="fx/image_proxy.php?FXimage=%DA%EB%FA%F9%88%B5">

 

 

 

Laura Long
Database/Web Designer


 

-----Original Message-----
From: Andy Gaunt [mailto:andy at fmpug.com] 
Sent: Thursday, April 20, 2006 2:46 PM
To: laural at ultimate-products.com; 'FX.php Discussion List'
Subject: RE: [FX.php List] Using an image in a container

Hi Laura,

 

Try the following

 

$ clientLogo
="FX/image_proxy.php?FXimage=".vignereEncryptURL($logoData['YOURCONTAINE
RFIELD'][0]);

 

 

You need to tell it your container image field, not the result of the FX
query

Andy Gaunt
T: 407.810.4722
andy at fmpug.com
http://www.fmpug.com <http://www.fmpug.com/>     

Recipient of FileMaker's 2005 "Mad Dog" Public Relations Award

For chapter locations, dates & times please visit the website at
http://www.fmpug.com <http://www.fmpug.com/>  If you can make it to a
meeting, please RSVP at http://www.fmpug.com/rsvp.php


  _____  


From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Laura Long
Sent: Thursday, April 20, 2006 2:39 PM
To: 'FX.php Discussion List'
Subject: [FX.php List] Using an image in a container

 

I ran the "echo_new_key.php" file in the fx folder and got my encrypted
key.  I copied and pasted that into the image_proxy.php file.

 

In my actual php page I have the following code:

 

<?php
require_once('FX/image_proxy.php');
include_once('FX/FX.php');
include_once('FX/server_data.php');
include_once('FX/FMErrors.php');

 

$logo=new FX($serverIP,$webCompanionPort,'FMPro7');
$logo->SetDBData('myDatabase.fp7',myLayout);
$logo->SetDBPassword('password','myPassword');
$logo->AddDBParam('idCompany',$_SESSION['idCompany']);
$logoResult=$logo->FMFind();

 

foreach($logoResult['data'] as $key=>$logoData){

 

$clientLogo="fx/image_proxy.php?FXuser={$FXE_username}&FXpass={$FXE_pass
word}&FXimage=" . vignereEncryptURL($logoResult);


echo "<img src=\"" . $clientLogo."\">";

 

echo $logo;

 

 } 

 

?>

 

The graphic comes up as a red X (no image found), and the view source
gives me the following:

 

 <p align="center"><img
src="fx/image_proxy.php?FXuser=&FXpass=&FXimage=%CC%FB%27%F5%9E">Object
id #2</p>

 

I put the echo $logo; statement in just to see what it would print, that
is where the Object id#2 is coming from.  Anyway, my question is, does
anyone know if I missed something?  I did not set a value to FXuser or
FXpass, do I need to, and if so, what would go there?  

 

Any insight or help to get my images in the container field to render
would be much appreciated - oh, and just to avoid the obvious, I would
prefer to not use a path to the image in this case, I would like to have
the image render directly from the container field - thanks again  :)

 

 

Laura Long
Database/Web Designer

-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of
gerry.charest at agfa.com
Sent: Thursday, April 20, 2006 1:36 PM
To: 'FX.php Discussion List'
Subject: [FX.php List] FX Query related Value

Is it possible to use a related field in a query? If so what is the
proper syntax for the related field?

Gerry Charest
Agfa Corporation

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20060421/7afbc82b/attachment-0001.html


More information about the FX.php_List mailing list