#32005/6/11 9:55:48
算是更新吧,就是说其它的内容都有了,图片后来加上,不是要指定ID吗?就下面save.asp这段代码怎么改才能接收并指定id号?
<form name="mainForm" enctype="multipart/form-data" action=save.asp" method=post>
<table width="536" height="102" border="0" cellspacing="0" class="tb-2-1">
<tr>
<td><input name="id" type="text" id="id"></td>
</tr>
<tr>
<td width="391"> <input name="filetext" type="file" id="filetext"> </td>
</tr>
<tr>
<td><input type="submit" name="Submit2" value="提交"> </td>
</tr>
</table>
</form>
'save.asp
<%
response.buffer=true
formsize=request.totalbytes
formdata=request.binaryread(formsize)
bncrlf=chrB(13) & chrB(10)
divider=leftB(formdata,clng(instrb(formdata,bncrlf))-1)
datastart=instrb(formdata,bncrlf & bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart
mydata=midb(formdata,datastart,dataend)
%>
<% set rs=server.createobject("ADODB.recordset")
sql= "SELECT img FROM xin where id is null"
rs.open sql,conn,1,3
rec("img").appendchunk mydata
rs.update
rs.close
set rs=nothing
set conn=nothing %>