Jump to content

Problem with Front End Album Gallery


Kolinski

Recommended Posts

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

Edited by Kolinski
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.