<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en"
"Http://www.w3.org/TR/html4/loose.dtd" >
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title> login page to prevent SQL injection </title>
<script type= "Text/javascript" >
function MyCheck (str) {
var mess= "Characters not allowed to enter: \ r \ n";
var mark= "yes";
if (Str.indexof (";") >=0) {
Mark= "No";
mess+= "; ";
}
if (Str.indexof ("&") >=0) {
Mark= "No";
mess+= "&";
}
if (Str.indexof ("<") >=0) {
Mark= "No";
mess+= "<";
}
if (Str.indexof (">") >=0) {
Mark= "No";
mess+= ">";
}
if (Str.indexof ("--") >=0) {
Mark= "No";
mess+= "--";
}
if (Str.indexof ("/") >=0) {
Mark= "No";
mess+= "/";
}
if (Str.indexof ("%") >=0) {
Mark= "No";
mess+= "%";
}
if (Str.indexof ("'") >=0) {
Mark= "No";
mess+= "'";
}
if (mark== "no") {
alert (mess);
return false;
}
else return
return true;
}
</script>
<body style= "font-size:12px" >
<table width= "382" border= "0" align= "center" cellpadding= "0" cellspacing= "0" >
<tr>
<TD height= "" background= "Images/login_01.jpg" > </td>
</tr>
<tr>
<TD height= "bgcolor=" #FEF7C3 "><table width=" border= "0" align= "center" cellpadding= "3" cellspacing= "0" >
<form name= "Form1" onsubmit= "MyCheck (form1.txt_name.value)" >
<tr>
<TD height= "colspan=" 2 align= "center" > </td>
</tr>
<tr>
<TD height= "align=" "right" > Admin:</td>
<TD height= "><input" name= "Txt_name" type= "text" class= "textbox" id= "Txt_name" size= "" maxlength= "50" ></td>
</tr>
<tr>
<TD height= "align=" "Right" > Secret
Code:</td>
<TD height= "><input" name= "txt_passwd" type= "Password" class= "textbox" id= "txt_passwd" size= "+" maxlength = "></td>"
</tr>
<tr>
<TD height= "colspan=" 2 "align=" center "><input name=" Login "type=" submit "id=" Login "value=" Login "class=" Button ">
<input type= "reset" name= "Submit2" value= "reset" class= "button" ></td>
</tr>
</form>
</table></td>
</tr>
</table>
</body>
Login page to prevent SQL injection