#1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    21
    Rep Power
    0

    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. #2
  3. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    How are you storing the advertisement? Database? Can you add fields to reference the filenames?
  4. #3
  5. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    21
    Rep Power
    0
    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...
  6. #4
  7. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    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.
  8. #5
  9. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    21
    Rep Power
    0
    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?

IMN logo majestic logo threadwatch logo seochat tools logo