...

View Full Version : BLOB and Forms



kenwvs
08-05-2006, 05:24 AM
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


<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

GJay
08-05-2006, 09:00 AM
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...

kenwvs
08-05-2006, 09:05 AM
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

GJay
08-05-2006, 01:08 PM
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...

kenwvs
08-05-2006, 01:16 PM
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.

kenwvs
08-05-2006, 01:20 PM
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">



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum