dim rs
dim sName
dim sSex
dim sPwd
dim sAddr
dim sPhone
dim sEmail
dim errorMsg
dim foundError
getInput()
saveData()
if foundError=false then
response.redirect "notebook.asp"
else
call showerrors()
end if
set rs=nothing
conn.close
set conn=nothing
sub saveData()
dim InsertCursor
Set InsertCursor = Server.CreateObject("ADODB.Recordset")
InsertCursor.Open "select * from customer",conn,1,3
InsertCursor.addnew
InsertCursor("custacct")=""
InsertCursor("custname")=htmlencode(sName)
InsertCursor("custsex")=htmlencode(sSex)
InsertCursor("custpwd")=htmlencode(sPwd)
InsertCursor("custaddr")=htmlencode(sAddr)
InsertCursor("custphone")=htmlencode(sPhone)
InsertCursor("custemail")=htmlencode(sEmail)
InsertCursor("time") =cstr(date())
InsertCursor.Update
InsertCursor.close
conn.close
set InsertCursor=nothing
if err>0 then
err.clear
foundError=true
ErrorMsg="<li>数 据 库 操 作 失 败 !</li>"
else
foundError=false
end if
end sub
sub showErrors()
%>
<html>