Extracting uploaded images from a record

7 posts by 2 authors in: Forums > CMS Builder
Last Post: November 12, 2008   (RSS)

By jamtc - November 10, 2008 - edited: November 10, 2008

Hi there !

I just want to know How is the pure PHP code to extract an image or images from a "field upload" from a simple record?

I just want to show this image(s)...

Thanks...

[blush]

Re: [jamtc] Extracting uploaded images from a record

By Dave - November 10, 2008

Hi jamtc,

What do you mean by "pure PHP code"? What is the code you are using to display the record and uploads right now?
Dave Edis - Senior Developer
interactivetools.com

Re: [jamtc] Extracting uploaded images from a record

By jamtc - November 11, 2008 - edited: November 11, 2008

Hi Dave !

I want to know how to eliminate the "<?" and "?>" of this PHP code and still make it funcional to apply directly to a PHP program ?

I don't know how to do this.[font "ARIAL"][font "ARIAL"]

I am afraid of affect the code when doing that...


Thanks,

[blush]

Re: [jamtc] Extracting uploaded images from a record

By Dave - November 11, 2008

Sorry, I'm still not clear. Do you want to be able to load the uploads to use in another php program?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Extracting uploaded images from a record

By jamtc - November 12, 2008

YES...

[:)]

Re: [jamtc] Extracting uploaded images from a record

By Dave - November 12, 2008

It's really hard to say without knowing what PHP program it is, etc. But this code will load an array of uploads for you:

<?php
require_once "/home/httpd/htdocs/sogalpbr/erp/cmsAdmin/lib/viewer_functions.php";

list($cobeluxRecords, $cobeluxMetaData) = getRecords(array(
'tableName' => 'cobelux',
'where' => '1',
'limit' => '1',
));

$cobeluxRecord = @$cobeluxRecords[0]; // get first record
$uploads = $cobeluxRecord['fa_fotos'];
?>


That code is pure PHP.
Dave Edis - Senior Developer
interactivetools.com