I'm making an image gallery script with PHP which is including a comment system. The basic function of the script is to read the folder's name and to show a gallery with the folder's name as title and it's images.
The problem is, that the comment system, which is made with mysql saves a comment like this:
ID | Folder | Image
This works great, but when I change the name of the folder, the script isn't working because there is set the wrong foldername in the Mysql table. Also when I just save the image's name there is the possibillity of having two pictures in diffrent folders with the same name.
Is it possible to identify a folder without using it's name?
//Note:
Thank you for your help, I think I found a solution. Now I just save the md5 hash of the image and save it in the Database instead of the foldername.