PHP script to upload an image but a bit of text as well with out database if poss

Discussion in 'PHP' started by jay_jg, Mar 3, 2009.

  1. #1
    Hi I am new to PHP. I have a script which will allow me to upload an image to a folder, but I would like to have add a caption underneath the image, I have a form which I upload the image. and a text field for the text. I am basically looking for a script to allow me to add the image and the text. Also is there a way of not using a database? I have a script which use's a database but was looking for ways not to use one any ideas? many thanks if this is possible
     
    jay_jg, Mar 3, 2009 IP
  2. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can store metadata in another file alongside the image. If the image is "pic003.jpg", just store the text and anything else serialised in "pic003.jpg-extra".
     
    SmallPotatoes, Mar 3, 2009 IP
  3. jay_jg

    jay_jg Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thank you for a quick reply, but wouldnt that add text to the image? I was trying to add a caption underneath the image in a table, so a pic in one row and text under that in another row, thank you
     
    jay_jg, Mar 3, 2009 IP
  4. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I am not sure why you think that storing text in a different file will do anything to an image, but I assure you that it will not.
     
    SmallPotatoes, Mar 3, 2009 IP
  5. jay_jg

    jay_jg Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    ok thank you I will give it a go, and show you the results thanks

    Jamie
     
    jay_jg, Mar 3, 2009 IP