Upload Picture File Paths to Database Without Creating Multiple Records and Giving The Files Random Names
- by user1830990
I want to be able upload pictures to a folder and their filepaths to a MySQL database without creating multiple records.
For example instead of:
id PicturePath size
1 file1.jpg 90832
2 file2.jpg 84593
I want to do:
id PicturePath1 PicturePath2 PicturePath3
1 file1.jpg file3.jpg file5.jpg
And also as it uploads, it should change the name of the original file e.g. if User uploads DSC0009.jpg it should upload into the file upload folder and MySQL Database as: someRandomFileName8087935.jpg