asp网页,英文无法写入sql,数字可以(我的是游戏网站修改密码页)
asp网页,英文无法写入sql,数字可以(我的是游戏网站修改密码页,修改密码时,改成数字可以改,改英文的话改不过来,数据库也没有变化 还是原来密码)请大神帮助看看-------以下为代码<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>帐号服务中心 - 修改密码</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
background-image: url(images/bg.gif);
}
-->
</style>
<style type="text/css">
<!--
body,td,th {
color: #FFC600;
}
-->
</style>
<link href="all.css" rel="stylesheet" type="text/css">
<script language="javascript">
function isContinuous(inputStr) {
inputStr = inputStr.toLowerCase();
var digital = "01234567890";
var letter = "abcdefghijklmnopqrstuvwxyz";
var digitalRev = "09876543210";
var letterRev = "zyxwvutsrqponmlkjihgfedcba";
if(digital.indexOf(inputStr) != -1 || letter.indexOf(inputStr) != -1 || digitalRev.indexOf(inputStr) != -1 || letterRev.indexOf(inputStr) != -1) {
return true;
}
return false;
}
function isSame(inputStr) {
for(var i=0;i < inputStr.length -1; i++) {
if(inputStr.charAt(i) != inputStr.charAt(i + 1)) {
return false;
break;
}
if(i == (inputStr.length - 2)) {
return true;
}
}
}
function check(){
var reg =/^[a-zA-Z0-9]{1,15}$/;
var num =/[0-9]{15,18}$/;
var form = document.mpwform;
var account = form.account;
var oldpwd = form.oldpwd ;
var newpwd = form.newpwd;
var newpwdok = form.newpwdok;
var mkey = form.mkey;
var regcode = form.regcode;
if (account.value.length < 4) {
alert("帐号长度不能小于4位");
mpwform.account.focus();
return false;
}
if (oldpwd.value.length < 6) {
alert("密码长度不能小于6位");
mpwform.oldpwd.focus();
return false;
}
if (newpwd.value.length < 6) {
alert("新密码长度不能小于6位");
mpwform.newpwd.focus();
return false;
}
if (isContinuous(newpwd.value)) {
alert("请不要使用连续的字符作为新的密码设置");
mpwform.newpwd.focus();
return false;
}
if (isSame(newpwd.value)) {
alert("请不要使用相同的字符作为密码");
mpwform.newpwd.focus();
return false;
}
if (reg.exec(newpwd.value)==null) {
alert("新的密码必须是数字或英文字母!");
mpwform.newpwd.focus();
return false;
}
if (newpwd.value == account.value) {
alert("为了您的帐号安全,请不要使用和帐号相同的密码");
mpwform.newpwd.focus();
return false;
}
if (newpwdok.value != newpwd.value) {
alert("请您确认两次输入密码一致!");
mpwform.newpwdok.focus();
return false;
}
if (mkey.value.length < 6 ) {
alert("钥匙单字长度小于6位,请您重新输入!");
mpwform.mkey.focus();
return false;
}
if (regcode.value.length != 4) {
alert("验证码必须为4位,请输入左边4位数字");
mpwform.regcode.focus();
return false;
}
return true;
}
function f_reset() {
document.mpwform.reset();
}
</script>
</head>
<body>
<div align="left">
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><!--#include file="title.asp"--></td>
</tr>
</table>
<br>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" class="tdregform">
<tr>
<td> <img src="images/mpwdec.gif" width="81" height="18"></td>
</tr>
</table>
<form action="mpwsetp2.asp" method="post" name="mpwform" id="mpwform">
<table width="600" border="0" align="center" cellpadding="4" cellspacing="1" class="tabelreg">
<tr class="tdregleft">
<td width="118" align="right" valign="middle" class="tdregleft"><strong>帐 号</strong></td>
<td width="582" valign="middle"><input name="account" type="text" class="inputreg" id="account" size="20" maxlength="12"></td>
</tr>
<tr class="tdregleft">
<td align="right" valign="middle" class="tdregleft"> </td>
<td valign="middle" class="tdregleft">请输入您的帐号。</td>
</tr>
<tr class="tdregleft">
<td align="right" valign="middle" class="tdregleft"><strong>密 码</strong> </td>
<td valign="middle" class="tdregleft"><input name="oldpwd" type="password" class="inputreg" id="oldpwd" size="20" maxlength="12"></td>
</tr>
<tr class="tdregleft">
<td align="right" valign="middle" class="tdregleft"> </td>
<td valign="middle" class="tdregleft">请输入您的密码。</td>
</tr>
<tr class="tdregleft">
<td align="right" valign="middle" class="tdregleft"><strong>新密码</strong> </td>
<td valign="middle" class="tdregleft"><input name="newpwd" type="password" class="inputreg" id="newpwd" size="20" maxlength="12"></td>
</tr>
<tr class="tdregleft">
<td align="right" valign="middle" class="tdregleft"> </td>
<td valign="middle" class="tdregleft">请输入新的密码。</td>
</tr>
<tr class="tdregleft">
<td align="right" valign="middle" class="tdregleft"><strong>确认新密码</strong> </td>
<td valign="middle" class="tdregleft"><input name="newpwdok" type="password" class="inputreg" id="newpwdok" size="20" maxlength="12"></td>
</tr>
<tr class="tdregleft">
<td align="right" valign="middle" class="tdregleft"> </td>
<td valign="middle" class="tdregleft">确认您已经记住了新的密码设置。</td>
</tr>
<tr class="tdregleft">
<td align="right" valign="middle" class="tdregleft"><strong>钥匙单字</strong> </td>
<td valign="middle"><input name="mkey" type="text" class="inputreg" id="mkey" size="20" maxlength="15"></td>
</tr>
<tr class="tdregleft">
<td align="right" valign="middle" class="tdregleft"> </td>
<td valign="middle" class="tdregleft">请输入您的钥匙单字。</td>
</tr>
<tr class="tdregleft">
<td align="right" valign="middle" class="tdregleft"><strong>验证码</strong> </td>
<td valign="middle" class="tdregleft"><input name="regcode" type="text" class="inputreg" id="regcode" size="4" maxlength="4">
<span class="tdine"><img src="inc/GetAutoCode.asp" alt=""> 请输入左边4位数字验证码。</span></td>
</tr>
<tr class="tdregleft">
<td align="right" valign="middle" class="tdregleft"> </td>
<td valign="middle" class="tdregleft"><FONT color=#ffff00>※ 以上项目必须填写。</FONT></td>
</tr>
<tr>
<td align="right" valign="middle"> </td>
<td valign="middle">
</td>
</tr>
<tr align="center">
<td colspan="2" valign="middle"><input name="submit" type="image" src="images/btn_ok.gif" width="77" height="28" border="0" onclick="return check()">
<a href="javascript:f_reset();"><img src="images/btnrest.gif" width="77" height="28" border="0"></a></td>
</tr>
</table>
</form>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><!--#include file="bottom.asp"--> </td>
</tr>
</table>
</div>
</body>
</html>