Solution | upload | data | database | No components once uploaded to the database for pictures and text, "Transformation upload Picture 2.0" is very good, but not entirely suitable for themselves. After careful reading of the source code, modify and test, change it to no component upload multiple text messages and multiple pictures to the database. And passed in the iis5+access2000+asp test. The source code is published, I hope to be able to those who have been plagued by this problem friends have helped. At the same time hope you fellow treatise.
Disclaimer: "Transformation no component Upload Picture 2.0" is not I wrote, in this to "transformation no component Upload Picture 2.0" of the author sincerely say: Thank you!
The code is as follows:
Upfile.index---------------------------------------------------------------------------------------
<!--Solemn declaration
This is free code, from the "Transformation no component Upload Picture 2.0" to modify, the purpose of this problem is only to help friends who have trouble,
and the "Transformation no component Upload Picture 2.0," said the author: thank you! This code is passed in the iis5+access2000+asp test
--gztiger
-->
<title> transformation Programming World without components upload text and pictures to the database Gztiger solution modified by: Gztiger </title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<body bgcolor= "#FFFFFF" text= "#000000" >
<form name= "Form1" method= "Post" action= "upfile.asp" enctype= "Multipart/form-data" >
<table border= "1" cellspacing= "0" cellpadding= "0" bordercolorlight= "#000000" bordercolordark= "#CCCCCC" width= "91" Height= ">"
<tr>
<TD align= "left" valign= "Middle" height= "a" width= "a" > </td>
<TD bgcolor= "#CCCCCC" align= "left" valign= "Middle" height= "a" width= ">" File Upload </td>
</tr>
</table>
<table width= "71%" border= "1" cellspacing= "0" cellpadding= "5" align= "center" bordercolordark= "#CCCCCC" bordercolorlight= "#000000" >
<tr bgcolor= "#CCCCCC" >
<TD height= "align=" "left" valign= "Middle" bgcolor= "#CCCCCC" > Transformation programming World File Upload modified version
Modified by: <a href= "mailto:gztiger@21cn.com" >gztiger</a> </td>
</tr>
<tr align= "left" valign= "Middle" bgcolor= "#eeeeee" >
<TD bgcolor= "#eeeeee" height= ">"
<!--You can add multiple text and file boxes anywhere
Add Textn=trim in Upfile.asp (Upload.form ("Textn"), Rs ("Imagedatan") =image_set (N)
Echo Submit information Needless to say, the database table also add relative field name:)
-->
text box 1:<input type= "text" name= "Text1" value= "picture and text upload Test 1" ><br>
text box 2:<input type= "text" name= "Text2" value= "picture and text upload Test 2" ><br>
text box 3:<input type= "text" name= "Text3" value= "picture and text upload Test 3" ><br>
Image 1: <input type= "file" Name= "Image1" style= "width:400" "value=" "><br>
Image 2: <input type= "file" Name= "Image2" style= "width:400" "value=" "><br>
Image 3: <input type= "file" Name= "Image3" style= "width:400" "value=" "><br>
text box 4:<input type= "text" name= "TEXT4" value= "picture and text upload Test 4" ><br>
text box 5:<input type= "text" name= "Text5" value= "picture and text upload Test 5" ><br>
text box 6:<input type= "text" name= "Text6" value= "picture and text upload Test 6" ><br>
text box 7:<input type= "text" name= "Text7" value= "picture and text upload Test 7" >
</td>
</tr>
<TR align= "center" valign= "Middle" bgcolor= "#eeeeee" >
<TD bgcolor= "#eeeeee" height= "" > <input type= "Submit" name= "Submit" value= "submitted" class= "BT" >
<input type= "reset" name= "Submit2" value= "Empty" class= "BT" > </td>
</tr>
</table>
</form>
</body>
Upfile.asp-----------------------------------------------------------------------------------------
<%Server.ScriptTimeOut=5000%>
<!--#include file= "Upload_5xsoft.inc"-->
<title> transformation Programming domain file upload modified version modified by: Gztiger </title>
<%
Dim Upload,file,formname,formpath,icount
Set Upload=new Uplo