So i have an idea how to implement my gallery on my website, but need help from someone experienced to see if it's OK or not.
So basically the idea is that when a moderator uploads a few images to an existing article, i would rename those images in something like [ name of the article + 8 random numbers ] just in case there are no duplicates. When i generate the new name, then the system will save it in a specific folder. And after that I append each name of an image on to an array which I later save in a database single column for that article in question. But each name is divided with a comma.
So my question is, would this be an OK solution? Never done this kind a thing so would really appreciate some sort of guidance.
EDIT 1: Ok the idea goes like this:
Moderator wants to add images to an existing article, he chooses the images, and uploads them for this example lets say there are 5 images. After the upload is completed the PHP code changes the names of the images uploaded to [article_name]+[random number, length 8] after that i plan to put the new names in an array like this:
array(image1,image2,image3,image4,image5);
After that it's only a matter of saving it to the DB and when needed i have the name of the images to be used in the gallery.
EDIT 2: For saving I intend to use the implode function. After saving it later for the gallery I can easily use the explode function to get every name out of the string.