Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: BLOB and Forms

  1. #1
    Regular Coder
    Join Date
    Jul 2006
    Posts
    168
    Thanks
    0
    Thanked 0 Times in 0 Posts

    BLOB and Forms

    I have a form that is filled out when there is equipment failure at a plant and it is working. Now they want to add the ability to include up to 4 photos with it. I have tried simply adding

    Code:
    <input type="file" name="photo1">&nbsp; &nbsp;&nbsp; <input type="file" name="photo2">&nbsp;&nbsp;&nbsp;
    <input type="file" name="photo3">&nbsp;&nbsp;&nbsp;<input type="file" name="photo4"> <br> <br>
    in the hope that it would upload the images to a DB column I added. The rest of the form still works, but it isn't uploading the images to the DB. I have it set to BLOB and am not even sure if that is correct.

    Any ideas on what I need to do, or if this is even possible.

    Ken

  • #2
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    You have some server side code to handle the form? things don't happen by themselves...
    I assume you have <form> tags on your page as well, is the enctype paramter set properly?
    What server-side language are you using? can't really help much without knowing that, as the process is very much a language one rather than a database one...

  • #3
    Regular Coder
    Join Date
    Jul 2006
    Posts
    168
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I use a mysql database and have the form tags on the form as well. I am able to upload all of the form fields to the database, except for the images.

    I am not sure if something special has to be done for the actual images to be uploaded to the DB. It would show on the DB in the table column BLOG and 0kb

  • #4
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    Quote Originally Posted by GJay
    You have some server side code to handle the form? things don't happen by themselves...
    I assume you have <form> tags on your page as well, is the enctype paramter set properly?
    What server-side language are you using? can't really help much without knowing that, as the process is very much a language one rather than a database one...
    added a bit of emphasis to help you...

  • #5
    Regular Coder
    Join Date
    Jul 2006
    Posts
    168
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can you help me out with how the enctype paramter should be set....An example of what I would be looking for. i am a newbie to this and not sure how to answer the question.

    Same with the server side language. I am not sure what the choices are. I can say that if I had to guess what you were asking, it would be mySQL, but I am thinking this isn't what you are asking. I am using PHP, and on second thought that might be what the question is.

  • #6
    Regular Coder
    Join Date
    Jul 2006
    Posts
    168
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here is the line that you are asking about. After I replied, it dawned on me what you were asking. I am a little slower than normal as I haven't actually been to bed tonight yet, and it is 6:15 a.m.

    <form action="" method="post"enctype="multipart/form-data">


  •  

    Posting Permissions

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