mlindal Posted January 27, 2005 Posted January 27, 2005 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 Kyle Johnson Posted January 29, 2005 Newbies Posted January 29, 2005 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.
mlindal Posted January 31, 2005 Author Posted January 31, 2005 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 = (maybe something using xml?)
Garry Claridge Posted January 31, 2005 Posted January 31, 2005 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
mlindal Posted February 1, 2005 Author Posted February 1, 2005 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?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now