|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Upload file related to advert
Hi
I am writing a website that I want to allow users to add an advert and then upload 4 pictures relating to that. I know how to do a simple file upload but does anyone know of a way of associating their pictures with their advert, without making the user name the files to suit etc. Bit baffled... but, i'm sure it can be done easily once you know how! |
|
#2
|
|||
|
|||
|
How are you storing the advertisement? Database? Can you add fields to reference the filenames?
|
|
#3
|
|||
|
|||
|
Yes the advert is being stored in a mysql database. The user fills in their required advert and then uploads pictures of it. I can add more fields to accomodate a solution...
|
|
#4
|
|||
|
|||
|
Create another table that stores an advert-to-picture-path relationship. That way you can have more than 4 pictures per advert if you need them.
|
|
#5
|
|||
|
|||
|
So is it possible to grab the names of the files that the user is uploading? If so thats a good solution.
Anybody got any examples that do this? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > Upload file related to advert |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|