 | |  |
 |

jimbly2
User
Apr 25, 2008, 5:35 AM
Post #1 of 3
(120 views)
Shortcut
|
|
which bit of recordset code to show a pic?
|
Can't Post
|
|
Hi, I am creating a 'dynamic' page which has an image which can be selected from a library of images along with text and heading, but I can't get the image to show? There seems a lot of code to do with the image in the 'Page viewer' page. This is the code I've been trying to display the image: <div id="apDiv3"><img src=" <?php if ($record): ?> <?php foreach (getUploads($options['tableName'], 'picture', $record['num']) as $upload): ?> <?php if ($upload['hasThumbnail']): ?> <img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" /><br/> <?php elseif ($upload['isImage']): ?> <img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" /><br/> <?php else: ?> <a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/> <?php endif ?> <?php endforeach ?> <?php endif ?>" /></div> Clearly it doesn't work, but I don't really understand what it all does. The image shows up fine in the 'page viewer' page. Where am I going wrong? thanks Jim
|
|
|  |
 |

jimbly2
User
Apr 25, 2008, 5:41 AM
Post #2 of 3
(119 views)
Shortcut
|
|
Re: [jimbly2] which bit of recordset code to show a pic?
[In reply to]
|
Can't Post
|
|
Fixed it :-) I'm gonna have to stop doing this!
|
|
|  |
 |

Dave
Staff
/ Moderator

Apr 25, 2008, 11:00 AM
Post #3 of 3
(112 views)
Shortcut
|
|
Re: [jimbly2] which bit of recordset code to show a pic?
[In reply to]
|
Can't Post
|
|
Heh, glad it's working! Dave Edis - Senior Developer interactivetools.com
|
|
|  |
|