A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: uploading images and using them.

  1. #1
    Member
    Join Date
    Feb 2010
    Posts
    32

    uploading images and using them.

    Hi guys,

    I need some help.

    I made a simple structure for a website were you can add, edit and remove information on apartments using php, mysql and javascript.
    I have my databases for the apartments, members and admins.

    i have a form were the admin can add some information on the apartment. e.g rooms, contact number, garage, space, price.
    But in this form i want to be able to upload photos in relation with the apartment. and be able to display that photo with the details of its apartment when its done uploading.
    I know it is not recommended to upload images in the database but to upload them to the image folder instead. but how do you store and use its information in the database?

    Im working on this to learn and extend my basic php knowledge.

    If anyone could help me or explain the concept of making it work i would appreciate it.

    Thanks alot.

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    well - you define a way of naming the images in the images folder that can be used by the database design. If there is at most one image per apartment, and apartment have a primary key, you could use that id for image name.
    If there are multiple images, you could create an image table, use a primary key id for the image filename, and have an apartment_id column in that table to relate the images to the objects
    In either setup there could be an "image name" column storing the original file name , for an image caption or the filename for "save as"

    Musicman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center