Write data to Notepad, a way to determine how a password is modified

Source: Internet
Author: User
Tags chr
<% @language = "Vbscript"%>
<% response.expires=0%>
<% if session ("fz_login") = "8" then%>
<%
If Request.ServerVariables ("http_method") = "POST" and checkme<> "true" then
Username=request.form ("username")
Password=request.form ("password")
Set Fs=server. CreateObject ("Scripting.FileSystemObject")
Set f = fs. OpenTextFile (server. MapPath ("userpw.asp"), 2, True)
F.writeline "<%"
F.writeline "P_username=" & Chr (+) & username & Chr (34)
F.writeline "p_password=" & Chr (+) & password & Chr (34)
F.writeline chr (Panax) & ">"
F.close
Set f=nothing
Set fs=nothing
Session ("Logusername") =username
Session ("Logpassword") =password
Edit_ok
End If
%>
<%sub EDIT_OK ()%>
<script language= "JavaScript" >
Alert ("Your username and password have been successfully modified!");
Document.location.href= "welcome.htm";
</script>
<%end sub%>
<script language= "JavaScript" >
function Checkform () {
if (document.form1.username.value== "") {
Alert ("Please enter a new user name and cannot be empty!");
Document.form1.username.focus ();
return false;
}

if (document.form1.password.value== "") {
Alert ("Please enter a new password!");
Document.form1.password.focus ();
return false;
}

if (document.form1.username.value.length<6 | | document.form1.password.value.length<6) {
Alert ("For network security, please enter a username and password greater than 6 characters!");
Document.form1.username.value= "";
Document.form1.password.value= "";
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.