Pure PHP Upload Tutorials - List records with images

Making a list of records with images

In this tutorial we will explain how to make a nice list of records with images. A detail page after the upload page.


How to do it

To make a list of images you have to:

  1. Make the new list page
    You can start with a new blank page.

  2. Add a Recordset
    You will need a recordset to get a list of all records.

  3. Insert File Name
    Put your cursor on the page. Open the Bindings Panel. Select Name and click insert.

    You will see {rs.Test.name} on your page.

  4. Add the image
    Next we will insert the image.

    Then click on Insert - Image. Instead of selecting an existing image from the File system, you should choose Data Sources !

    Then select the name field from the rsTest recordset. Because we uploaded all pictures to the images folder and store only the filename in the database, you need to put images/ before the database field.

  5. Add a Repeat Region
    Now that we have inserted the image, we need to make a repeat region from this record. So you can see a list of all records.

    First select the whole first row, then choose Repeat Region from the Server Behaviors palette.

    Now we have a full list of all existing images in the database.

  6. Save and done
    Save your page and upload it to your server, and you are done! Go to your website and test it - you should be able to list records!