<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <% option explicit dim username,userpasswd,user,usersex,usernote,conn,db,rs,sql db="mdb/aaaa.mdb" username=request.form("textname") userpasswd=request.form("textpasswd") user=request.form("textuser") usersex=request.form("sex") usernote=request.form("textnote") Set conn = Server.CreateObject("ADODB.Connection") conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db) add_sql="select * from zhuce where name" sql="select * from zhuce where name='"&username&"'" Set rs = Server.CreateObject("ADODB.RecordSet") rs.open sql,conn,1,1 if not rs.eof then %> <style type="text/css"> <!-- .style1 { font-family: "宋体"; font-size: 10pt; } --> </style>
对不起,用户名已经有人用了,请换其他的用户名试一下! <%else rs.open add_sql,conn,1,3 rs.addnew '*******************************这里自己来写,略了! Rs.Close Set Rs=Nothing response.write "<script language=javascript>alert('添加成功!');document.location='book1.asp';</script>" %>
外贸综合平台:E贸通