⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 regsubmit.asp

📁 在线交友模块:在线交友是指通过网络来结交朋友。利用网络资源的无限性实现跨地域的信息交流
💻 ASP
字号:
<%
   user_name=left(request("user_name"),10)
   password=left(request("password"),10)

if password="" then
   response.write "数据有错!"
   response.end
end if

Set conn = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("friend/global.asa")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
Set rs_user = Server.CreateObject("ADODB.Recordset")
sql="select * from user_reg where user_name like '" & user_name & "'"
rs_user.open sql,conn,3,2

if rs_user.eof and rs_user.bof then
        rs_user.addnew
        rs_user("user_name")=user_name
        rs_user("password")=password
        rs_user("date")=date
        rs_user.update
        rs_user.movelast
        session("user_id")=rs_user("user_id")
        rs_user.close
        response.redirect "regok.asp"
        response.end
else
%>
<html>
<head>
<style>
<!--
tr           { font-size: 9pt }
td           { font-size: 9pt }
body         { font-size: 9pt }
a:link       { color: blue; text-decoration: none }
a:visited    { color: blue; text-decoration: none }
a:active     { color: #ff9966; text-decoration: none }
a:hover      { color: red; text-decoration: none }
-->
</style>
</head>
<body topmargin="0">
<div align="center">
  <center>
<table border="0" width="400" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%"><b><font color="#008000" size="3">必填栏目发现问题</font></b></td>
  </tr>
</table>
  </center>
</div>
<div align="center">
  <center>
  <table border="1" width="400" bordercolor="#336699" cellspacing="0" cellpadding="5">
    <tr>
      <td width="100%">
      <ul>
        <li><font color="red">已经有人选择了该<b>用户名称</b></font>。请选择另一个用户名称,可以尝试在要记住的名称结尾添加一个数字。</li>
      </ul>
      </td>
    </tr>
  </table>
  </center>
</div>
<p align="center"><a href="reg.asp">[重新注册]</a></p>
</body>
</html>
<%end if%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -