lets create an images table, you store the location to the file, and store the type, size,
image table:
image_id (Primary Key)
file_name this is the physically name of your file.
file_type
file_size
Lets create another table, called, image_names
It will have: image_names table
name_id (Primary Key)
image_id (Foreign Key, this is the relation to the images table)
Name
How you populate the multiple names? Lets create the field for the file upload, and use a Names textfield to get the names using a comma separator.
Then insert the file location to the image table, you will have the image_id then,
lets explode the File_Name field (search on the syntax explode on php.net)
Then insert the image_id And the exploded Names into new rows to the image_names table.
When you list the images, use a link (INNER JOIN) to the image_names table:
SELECT * FROM image INNER JOIN image_names ON image_names.image_id=image.image_id;
Hello, jjozsi.