<%dim xm,tel,pass,zj_id,sushe,zy,ip,ip_in,ip_out,dns,fs,money,kong,id_num,zj
xm=trim(request("xm"))
tel=trim(request("tel"))
pass=trim(request("pass"))
zj_id=trim(request("zj_id"))
sushe=trim(request("sushe"))
zy=trim(request("zy"))
ip=trim(request("ip"))
ip_in=trim(request("ip_in"))
ip_out=trim(request("ip_out"))
dns=trim(request("dns"))
fs=trim(request("fs"))
money=trim(request("money"))
kong=trim(request("kong"))
id_num=trim(request("id_num"))
zj=trim(request("zj"))
%>
<html>
<head>
<title>1</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body>
<% if (xm="" or zj_id="" or ip="" or id_num="" or pass="" or zy="" or money="" or sushe="") then
%>
<script language="VBScript">
MsgBox "有需要添的项,您没有添!"
history.back()
</script>
<%end if%>
<%
dim sqlReg,rsReg
sqlReg="select * from [form] where id_num='" & id_num & "'"
set rsReg=server.createobject("adodb.recordset")
rsReg.open sqlReg,conn,1,3
if not(rsReg.bof and rsReg.eof) then
founderr=true
errmsg=errmsg & "<br><li>你添加的ID已经存在,请重新添加</li>"
else
rsReg.addnew
rsReg("xm")=xm
rsReg("Pass")=Pass
rsReg("tel")=tel
rsReg("zj_id")=zj_id
rsReg("sushe")=sushe
rsReg("zy")=zy
rsReg("ip")=ip
rsReg("ip_in")=ip_in
rsReg("ip_out")=ip_out
rsReg("dns")=dns
rsReg("fs")=fs
rsReg("money")=money
rsReg("kong")=kong
rsReg("id_num")=id_num
rsReg("zj")=zj
rsReg.update
end if
rsReg.close
set rsReg=nothing
%>
这个是我提交数据到数据库的文件····
可以用的。。。