Jump to content

This topic is 7305 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Simple question and hopefully simple answer:

In PHP what is the code to display an image from a container field?

Ie) in CDML:

<img src="[FMP-Image:CoverImage]">

In PHP using FM5/6 you can use:

<img src="http://localhost:591/FMPro?-db=publcations.fp5&-recid=<?php echo $recid; ?>&Coverimage=&-img">

But that won't work in FM7

In FX.php there appears to be a convoluted way to do it in a secure way. But all I want to know is the very basic simple was to do it using PHP code.

Who can answer this?

Posted

I am new to PHP and still getting my head around the new codes, but is this a Filemaker structural problem. I wonder if MySQL or Oracle is better at interacting with PHP and images.

From what I have been reading I am lead to believe that PHP does not present a good way to get images from a database.

In filemaker 7, is there a way to get the image from the container field similar to fm5/6

ie) FM5/6 code =

<img src="http://localhost:591/FMPro?-db=publcations.fp5&-recid=<?php echo $recid; ?>&Coverimage=&-img">

FM7 code = B) (maybe something using xml?)

Posted

Re: <img src="http://localhost:591/FMPro?-db=publcations.fp5&-recid=<?php echo $recid; ?>&Coverimage=&-img">

That is CDML. FM7 does not do CDML!

This is what the FX php method looks like:

<img src="/FX/image_proxy.php?FXimage=<?php echo vignereEncryptURL($PatientInfo['data'][$Patkey[0]]['thumbnail'][0]); ?>">

All the best.

Garry

Posted

Thanks Gary,

At this point you really have to appreciate the simplicity of CDML.

The image_proxy.php method seems so cumbersome - but should work.

Someone should simplify the class and do away with the encryption key.

A great function that looks like:

<img scr="<?php getimage($dbasename, $fieldname); ?>">

I know it doesn't exist, but how tough could it be to write one?

This topic is 7305 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.