如何实现!请教

我的原程序是,如何实现在首页通过验证后操作.....留言、联系我,比如:

导航栏中----->首页       留言    联系我 

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<p>&nbsp;</p>
<form name="form2" method="post" action="">
  <table width="760">
    <tr>
      <td>首页</td>
      <td>留言板</td>
      <td>联系我</td>
    </tr>
  </table>
</form>
<p>
  <!-- #include file="include.inc.asp"-->
  <a href="uu.asp?act=loginout" class="STYLE7">
    <%
set rst=server.createobject("adodb.recordset")
     if request.querystring("act")="login" then
        '登录
          sql="select * from uset where t_name='" & request.form("h_name") & "'"
              sql=sql & " and t_pass='" & request.form ("h_pass") & "'"
                   rst.open sql,conn,1,1
                      if rst.recordcount>0 then
                            session("uset")=rst("t_name")
                    session("acc")=true                     
          else
                     response.write "用户名或密码错误!"
                end if
              rst.close
          else if
    request.querystring("act")="loginout" then   
     
session("uset")=""
session("acc")=false      
end if

if not session("acc") then
%>
  </a>
</p>
<p><a href="uu.asp?act=loginout" class="STYLE7">请登录</a></p>
      <form  id="form1" name="form1" method="post" action="uu.asp?act=login">
        <a href="uu.asp?act=loginout" class="STYLE7">
          <label>用户名
            <input type="text" name="h_name">
            <br>
            <br>
            密码&nbsp;&nbsp;
            <input type="text" name="h_pass">
            <br>
            <br>
            <br>
            <input type="submit" name="Submit" value="登录">
          </label>
        </a>
        <p> <a href="uu.asp?act=loginout" class="STYLE7">
          <%
             else
                %>
          <%
          end if
             %>
          </a>
</form>
      <p> </p>
    </div></td>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

  <p align="center">&nbsp;</p>
  <p align="left">&nbsp;</p>
<p align="left"></p>
<p></p>

<%
set rst=nothing
conn.close
set conn=nothing
%>
<%
end if
%>

</body>
</html>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值