I have a backend which works fine. It creates a title and a description for an album. Which then you can add a photo to an album. Each photo is stored in a directory! not in the database. You have a unique album_id for each album. e.g. 1 2 3 4 5.... You then have a folder called thumbs which again will have 1,2,3,4,5 for the thumbnail pictures for that album.
The Problem:
I have a script which shows the images of a certain directory but I don't want this.
I've been working on a script which use a while loop. I would like to loop through the directory of 'thumbs'. for each album_id I want to get a random thumbnail appearing for that album.
I have attached the script to the post. At the moment I am getting an error:
Notice: Undefined index: album_id in C:\xampp\htdocs\dashboard\test1.php on line 4
The other attached file called test.php works fine and that shows me thumbnails of the album id folder 8.
I've been working on this for days, I can't find anything online to help me sort this, I followed some tutorials, I asked some friends and this is where I've got to...
I'd really appreciate any help Thank you - This is my first post so I apologize in advance
test1.php
test1.php
test.php