Using UPLOAD in PHP

Discussion in 'PHP' started by Bhullarz, Oct 29, 2008.

  1. Bhullarz

    Bhullarz New Member

    Joined:
    Nov 15, 2006
    Messages:
    253
    Likes Received:
    13
    Trophy Points:
    0
    Occupation:
    System Manager
    Home Page:
    http://www.tutors161.com
    Hi ! I am learning PHP now. Can somebody tell me how to upload images using PHP. I am trying to develop website for which I have to upload images. I have prepared forms in which one field is image. I want to upload the image to server where i have hosted the website. Can somebody help me in this like what would be preferable uploading image to MySQL database or uploading image directly to server ?
     
  2. pete_bisby

    pete_bisby New Member

    Joined:
    Nov 11, 2007
    Messages:
    48
    Likes Received:
    2
    Trophy Points:
    0
    Occupation:
    Software Developer/Analyst, PB
    Location:
    Manchester, England
    Home Page:
    http://www.pbworld.co.uk
    Have a look at this page within the PHP Manua (http://uk.php.net/manual/en/features.file-upload.php)

    Also, I would advise you to upload your images directly to the server and not to the database. You would be creating unnecessary overhead in your database, because you would have to convert the images to BLOBs, which are very large.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice