how to add data ( name, message etc) and 3 images path into DB (images in folder


how to add data ( name, message etc) and 3 images path into DB (images in folder)
because its impossible to add 3 images into DB with phone number name, message etc ??


Create a table for the images.

[php]create table Image (
id int auto_increment primary_key,
member_id not null,
file_path varchar(256) not null,
dateAdded timestamp default CURRENT_TIMESTAMP,
) engine=InnoDB;[/php]


I have but I need a table or 2 tables for name, message, phone, email and 3 images ( like adding adverts) I know how to add all info into DB, but I have no idea how to add 3 images with this informations


You don’t need, and actually don’t want, the same data duplicated everywhere.

Using the table i created, you would pull the images from the database based on the user id provided.


do I need columns for image type and image tmp_name??


tmp_name, no. Type, depends how you use it. Otherwise, let the system determine how it wants to deal with it.

A system I built stored the original file name, but that wasn’t the filename it used in the directory. When displaying it to the user, it would show the original name it had when it was uploaded.


Thank you so much I will try do add it and we will see if its gonna work