Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Display images from Container field

Featured Replies

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?

  • Newbies

There really isn't a very simple basic way to do it. The image proxy stuff in FX.php is really the best way to go.

  • Author

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?)

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

  • Author

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?

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.