uploading multiple files and saving the paths to some other db

My problem is

1 - want to add new car

2 - want to add multiple images against that car

3 - Save images paths to some other table … say carmedia

4 - save images reference while adding car [in case there is some error on adding process]

Any thought


OR lets make it more general

want to add multiple images/files against some table

and save the paths of those images/files in some other table having foreign key of first table

Hope this will more clear to answer



I’m doin’ the same thing but … with just one image by car. Maybe this link will be helpful for you:



i read this article but it does not fulfill my requirements…

i need some even more advance way [may be some AJAX also]

like add car

go to other page

upload image and show its thumbnail on same page without refreshing page

can delete from same place

can change from same place


lets see how i do it