如何将验证码生成的数字与表单中填写的进行验证呢?
我的数据保存前的验证代码估计问题就在这里:
<%
If Trim(Session("psn"))<>Trim(Request.Form("validatecode")) Then
rs.close
set rs=nothing
Response.Write ("<script>alert('友情提示!\n\n验证编码输入错误!');history.back();</script>")
Response.end
end if
%>
下面是我的表单中:验证码的部分:
<td align="right" bgcolor="#EFF7FE">验证码:</td>
<td><input name=validatecode style="width:64px;height:20px" maxlength=6 size="6"> <img src=Code.asp align=absmiddle style='cursor:pointer' alt='验证码看不清楚?请点击刷新验证码' onclick="this.src='Code.asp?'+Math.random()"> <font color="#FF0000">*</font><span id=Code></span></td>