Member Registration Verification Code (PHP+MYSQL+AJAX)

Source: Internet
Author: User
Keywords Web page production Ajax javascript
Tags ajax code entered the function html http javascript mysql

Member Registration Verification Code (PHP tutorial +mysql tutorial +ajax)


<!doctype HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/ Xhtml1-transitional.dtd ">


<html>


<head>


<meta http-equiv= "Content-type content=" HTML; Charset=utf-8 "/>


<link href= "images/css tutorials. css rel=" stylesheet "type=" Text/css "/>


<title> Member Registration Verification Code (PHP+MYSQL+AJAX) </title>


<script language= "Web effects src=" Web effects/common. Web Effects "></script>


<script language= "Web Effects" src= "Js/prototype.js" ></script>


<script language= "javascript" src= "Js/passwordstrength.js" ></script>


<script language= "JavaScript" >


var icon = ';


var ns = ["usr", "pwd", "repwd", "eml"];


function Changeusr () {


if ($ ("checkbtn"). Disabled) $ ("checkbtn"). Disabled = false;


 }


function Checkusr (s) {


var ma = [user name (4-16-bit)! "," The user name by the number, English, underline, the bar line composition! "];


if (!limitlen (s,4,16)) {


showinfo ("usr", ma[0]);


return false;


  }


if (!hasaccountchar (s)) {


showinfo ("usr", ma[1]);


return false;


  }


showinfo ("usr");


return true;


 }


function Checkpwd (s) {


var ma = [Password (6-16-bit)! "," The password cannot contain Chinese or full-width symbols! "," two times entered the password inconsistent! "];


PS Tutorial. Update (s);


if (!limitlen (s,6,16)) {


showinfo ("pwd", ma[0));


return false;


  }


if (Haschinesechar (s)) {


showinfo ("pwd", ma[1));


return false;


  }


if (Limitlen ($f ("Repwdinput"), 6,16)) {


if (Trim ($f ("repwdinput")) = = Trim (s)) {


showinfo ("pwd");


showinfo ("repwd");


return true;


}else{


showinfo ("pwd", ma[2));


return false;


   }


  }


showinfo ("pwd");


return true;


 }


function Checkpwd2 (s) {


var ma = [Confirm password (6-16-bit)! "," The password cannot contain Chinese or full-width symbols! "," two times entered the password inconsistent! "];


if (!limitlen (s,6,16)) {


showinfo ("Repwd", ma[0));


return false;


  }


if (Haschinesechar (s)) {


showinfo ("Repwd", ma[1));


return false;


  }


if (Limitlen ($f ("Pwdinput"), 6,16)) {


if (Trim ($f ("pwdinput")) = = Trim (s)) {


showinfo ("pwd");


showinfo ("repwd");


return true;


}else{


showinfo ("Repwd", ma[2));


return false;


   }


  }


showinfo ("repwd");


return true;


 }


function Checkeml (s) {


var ma = [Please enter a common message!] "," the message format is not correct! "];


if (S.length < 5) {


showinfo ("eml", ma[0));


return false;


  }


if (!isemail (s)) {


showinfo ("eml", ma[1));


return false;


  }


showinfo ("eml");


return true;


 }


function Showinfo (n,s) {


var fdo = $ (n "Framediv");


var ido = $ (n "Infodiv");


if (typeof s = = ' undefined ') {


fdo.classname = "Framedivpass";


ido.innerhtml = "<img src=images/duihao.jpg>";


}else{


fdo.classname = "Framedivwarn";


ido.innerhtml = icon + S;


  }


 }


 //======================================================;


function Loadcheck () {


if (Trim ($f (' Usrinput ')). length = 0) return;


$ ("checkbtn"). Disabled = true;


var o = $ ("Checkdiv");


o.innerhtml = Getloadinfo ();


loadajaxdata ("reg.php", {usr: $f (' usrinput ')},successcheck,errorcheck);

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.