Use two upload fields in a listing
I am working on a site for a teacher providing lessons online that can be downloaded. On one of the pages, we have book "covers" and an associated PDF file for download. I created a multi-record section editor with an upload field for the photo/image and an upload field for the PDF.
My question/problem. On the listing page, I want to display the image with the correct link to the PDF. There may be an actual detail page in the future, but right now I just want to show the image with a link that brings up the PDF.
Since these are upload fields, I'm struggling with the logic of getting those two sets of information together.
Ideas and suggestions are welcome!
Here's the page on the website: http://resursescolare.com/activity-books-new.php
(yes, it has errors ... I'm not finished with it yet)
To expand on Deborah's answer a bit, I'd create two upload fields, one that contains the book cover image called 'cover_image' and one that contains the book PDF called 'pdf'. I'd limit the fields so that each can only contain one upload. With this setup, Deborah's code would return one image and pdf per book record.
PHP Programmer - interactivetools.com