Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2007
    Posts
    5

    Unanswered: insert pics in db

    hey guys im still new at php and mysql so i have a little question.

    i have a virtuel flyer im making and i need it to be updatable .

    so i amade a form that inserts the data(name,description,price)

    in the database and i fetch it afther in a view page.

    now i have been messing arround for about a week on how to upload an image at the same time in that form ,store it and retreive it with the view page..

    like i need a form with name description price and image.

    can somebody help me on this??

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    don't store the image in the database, store it on the web server and put the image path in the database

    moving thread to php forum
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Nov 2007
    Posts
    5
    so basically i would have to make an upload form and in the form for updating i would have a field for path?cause i need to make it very simple.the guy im doing it for is no good in computer stuff..lol

  4. #4
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    Nope, it's easier. You create your form as multipart. I will refer you to this link to read : http://uk3.php.net/features.file-upload The html input tag you are looking for is there, tell me if you spot it
    This should provide you with the HTML and also the PHP variables you can utilise after you have "POST"ed your script to the server.

Posting Permissions

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