<%
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("../date/ws.mdb")
s_nameg=request.form("nameg")
s_name=request.form("name")
s_add=request.form("add")
s_tel=request.form("tel")
s_tel1=request.form("tel1")
s_tel2=request.form("tel2")
%>
<%
on error resume next
if trim(s_name)="" or trim(s_add)="" or trim(s_tel)="" then
response.write ("<script>alert('姓名,电话,地址必需要填写!');window.location.href='list.asp'</script>")
response.end
else
sqlr="insert into dzmp(s_nameg,s_name,s_add,s_tel,s_tel1,s_tel2)values('"&username&"','"&userren&"','"&useradd&"','"&usertel&"','"&usertell&"','"&userwork&"')"
conn.execute(sqlr)
if conn.errors.count>0 then
response.write("<script>alert('添加失败,返回重新添加!');window.location.href='insert_form.asp';</script>")
response.end
else
response.write("<script>alert('提交成功!');window.location.href='list.asp';</script>")
response.end
end if
%>
不知到哪错了 提示 :您要访问的网页有问题,无法显示。
我找不出哪有错来了 难道是机子的问题?
HTTP 500 - 内部服务器错误
Internet Explorer
[此贴子已经被作者于2005-11-13 15:52:15编辑过]