首 页建站教程源码中心网站建设与网上创业处世绝学炫彩Qzong游客留言在线日历QQ诱惑
您当前的位置:海鸿源码网建站教程ASP → 建站内容 退出登录 用户管理
本类热门文章
海鸿源码网推荐
防止表单在网站外部提交
作者:佚名  来源:本站整理  发布时间:2007-12-12 16:20:03

减小字体 增大字体

表单页面:login.asp

<form name="form1" action="check_form.asp" method="post">
  <div align="center">
    <p>     </p>
    <table width="362" height="252" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="156" valign="top" background="images/00.jpg"><table width="323" height="171" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="43" colspan="2"> </td>
          </tr>
          <tr>
            <td width="86" height="77" valign="bottom">  用户名;</td>
            <td width="237" valign="bottom"><div align="left">
              <input type="text" name="textfield2">
            </div></td>
          </tr>
          <tr>
            <td height="23">  密 码:</td>
            <td height="23"><div align="left">
              <input type="text" name="textfield22">
            </div></td>
          </tr>
          <tr>
            <td height="27" colspan="2">                    
              <div align="center">
                  <input type="submit" name="action2" value="提交"> 
                 
                  <input type="reset" name="Submit" value="重置">
              </div></td>
          </tr>
        </table></td>
      </tr>
    </table>
    <p><br>
        </p>
  </div>
</form>

检测页面:check_form.asp

      <%
ServerName1=Cstr(Request.ServerVariables("HTTP_REFERER"))
ServerName2=Cstr(Request.ServerVariables("SERVER_NAME"))
if Mid(ServerName1,8,len(ServerName2))<>ServerName2 then
  Response.Write "禁止从网站外部提交表单!!"
end if
%>

[] [返回上一页] [打 印]
建站评论 (评论内容只代表网友观点,与本站立场无关!)

用户名: 查看更多评论

分 值:100分 85分 70分 55分 40分 25分 10分 0分

内 容:

         (注“”为必填内容。) 验证码: 验证码,看不清楚?请点击刷新验证码

关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 -