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

📄 reguser.asp

📁 商业网站/图片管理系统/投票系统/新闻管理系统/
💻 ASP
字号:
<!--#include file="top.asp"-->
<%
'on error resume next
dim rst,sql,sql2,myErrors

if request.querystring("act")="reg" then
   if request.form("f_name")="" or request.form("f_password")="" or request.form("f_email")="" or request.form("f_tel")="" or request.form("f_realname")="" or request.form("f_question")="" or request.form("f_answer")="" then
       msgboxU("你提交的信息不全")
	elseif instr(1,request.form("f_email"),"@",1)=0 then
		msgboxU "你的邮箱格式不正确!"
   else
       set rst=server.createobject("adodb.recordset")
	   sql="select count(*) as recnum from shop_user where u_name='"&request.form("f_name")&"'"
	   rst.open sql,conn,1,1
	   if rst("recnum")>0 then
	      msgboxU("用户名已经存在")
	   else
	      sql2="insert into shop_user (u_name,u_password,u_email,u_tel,u_realname,u_question,u_answer,u_sex) values('"&request.form("f_name")&"','"&request.form("f_password")&"','"&request.form("f_email")&"','"&request.form("f_tel")&"','"&request.form("f_realname")&"','"&request.form("f_question")&"','"&request.form("f_answer")&"','"&request.form("f_sex")&"')"
	      conn.execute sql2
	      set myErrors=conn.errors
	      if myErrors.count=0 then
	         msgboxU("注册成功")
	      else
	         msgboxU("注册失败,原因:"&myErrors.item(0).description)
	      end if

	   end if
	   rst.close
       set rst=nothing
   end if
end if
%>
<div align="center">
  
  <table width="780" border="0" cellpadding="0" cellspacing="0">
    <!--DWLayoutTable-->
    <tr>
      	<td width="13" height="300" valign="top" background="images/v_bar_l.gif"><!--DWLayoutEmptyCell-->&nbsp;</td>
      	<td width="754" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr>
          <td width="754" height="29" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
            <!--DWLayoutTable-->
            <tr>
              <td width="754" height="29">用户注册:带<span class="STYLE1" style="color: #FF0000">*</span>为必填</td>
            </tr>
          </table>          </td>
          </tr>
        <tr>
          <td height="271" class="allbcolor"><form id="form" name="form" method="post" action="reguser.asp?act=reg">
            <div align="center">
              <table width="370" height="177" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="82"><div align="left">用户名</div></td>
                    <td width="173"><div align="left">
                      <input name="f_name" type="text" id="f_name" maxlength="50" />
                    </div></td>
                    <td width="115"><div align="left" class="STYLE1" style="color: #FF0000">*</div></td>
                  </tr>
                  <tr>
                    <td><div align="left">密 码</div></td>
                    <td><div align="left">
                      <input name="f_password" type="password" id="f_password" maxlength=50 />
                    </div></td>
                    <td><div align="left" class="STYLE1"><span style="color: #FF0000">*</span>6-50位字母和数字组成的密码</div></td>
                  </tr>
                  <tr>
                    <td><div align="left">E-mail</div></td>
                    <td><div align="left">
                      <input name="f_email" type="text" id="f_email" maxlength="50" />
                    </div></td>
                    <td><div align="left" class="STYLE1" style="color: #FF0000">*</div></td>
                  </tr>
                  <tr>
                    <td><div align="left">性 别</div></td>
                    <td><div align="left">男
                      <input  name="f_sex" type="radio" value="男" checked="checked" />
                      <input  type="radio" name="f_sex" value="女" />
                    </div></td>
                    <td><div align="left" class="STYLE1" style="color: #FF0000">*</div></td>
                  </tr>
                  <tr>
                    <td><div align="left">电 话</div></td>
                    <td><div align="left">
                      <input name="f_tel" type="text" id="f_tel" maxlength="50" />
                    </div></td>
                    <td><div align="left" class="STYLE1" style="color: #FF0000">*</div></td>
                  </tr>
                  <tr>
                    <td><div align="left">真实姓名</div></td>
                    <td><div align="left">
                      <input name="f_realname" type="text" id="f_realname" maxlength="50" />
                    </div></td>
                    <td><div align="left" class="STYLE1"><span style="color: #FF0000">*</span>请如实填写,以便以后活动通知或货物认领</div></td>
                  </tr>
                  <tr>
                    <td><div align="left">密码提示问题:</div></td>
                    <td><div align="left">
                      <input name="f_question" type="text" id="f_question" maxlength="50" />
                    </div></td>
                    <td><div align="left" class="STYLE1" style="color: #FF0000">*</div></td>
                  </tr>
                <tr>
                    <td><div align="left">密码提示答案:</div></td>
                    <td><div align="left">
                      <input name="f_answer" type="password" id="f_answer" maxlength="50" />
                    </div></td>
                    <td><div align="left" class="STYLE1" style="color: #FF0000">*</div></td>
                  </tr>
				 
				  <tr>
				   <td colspan="2"><div align="center">
				     <input type="submit" name="Submit" value="提交" />
				       
				     <input type="reset" name="Submit2" value="重置" />
				     </div></td>
				   <td>&nbsp;</td>
				  </tr>
                          </table>
            </div>
          </form>          
          	<div style="padding:20px;" align="center">
          		<input type="submit" name="Submit3" value="返回登陆页面" onclick="javascript:location='index.asp';" />
          		</div></td>
        </tr>
      </table></td>
      	<td width="13" valign="top" background="images/v_bar_r.gif"><!--DWLayoutEmptyCell-->&nbsp;</td>
    </tr>
    </table>
	
</div>
<!--#include file="bottom.asp"-->

⌨️ 快捷键说明

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