Member Registration Verification Code (PHP+MYSQL+AJAX)

Source: Internet
Author: User
Tags mysql tutorial php tutorial rtrim

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= "text/html; Charset=utf-8 "/>


<link href= "images/css tutorial. 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);





}


function Successcheck (v) {


var o = $ ("Checkdiv");


o.innerhtml = getcheckhtml (V.responsetext);


}


function Errorcheck () {


$ ("checkbtn"). Disabled = false;


var o = $ ("Checkdiv");


o.innerhtml = GetErrorInfo ();


}


function getcheckhtml (s) {


s = (s = = "1")? "Congratulations, user name can be registered!" ":" Sorry, the username has been registered! ";


return s;


}


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


function Getloadinfo () {


Return ' Loading data ... '


}


function GetErrorInfo () {


Return ' data loading failed! '


}


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


function Initpage () {


for (Var i=0;i<ns.length;i++) {


$ (ns[i]+ "input"). Value = "";


}


}


function Checksignup () {


if (Document.formsignup.reauthnum.value = = "") {


Window.alert (' Please enter the authentication code!! ');


Document.formsignup.reauthnum.focus ();


return false;


}


return true;


}


function Isallow_jewellry () {


if (document.formsignup.agree.checked = = False) {


Document.formsignup.submit.disabled = true;


}else if (document.formsignup.agree.checked = = True) {


document.formsignup.submit.disabled = false;


}


}

</script>

&lt;body class= "StatusBar" onload= "initpage ();" &gt;


&lt;table width= "100%" class= "wn_login_01" &gt;


&lt;tr&gt;


&lt;td&gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "100%" &gt;


&lt;tr&gt;


&LT;TD height= "&gt;&lt;/td&gt;"


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" align= "Center" &gt;


&lt;tr&gt;


&LT;TD height= "class=" "Hyzc-4" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" align= "Center" &gt;


&lt;tr&gt;


&LT;TD height= "class=" "Hyzc-5" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "713" height= "&gt;&lt;/td&gt;"


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD class= "Hyzc-8" &gt; Please register members, only members can post posts, visitors can reply and use the Quick response function!&lt;/td&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "713" height= "&gt;&lt;/td&gt;"


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "420" &gt;&lt;font class= "hyzc-1-1" &gt; Hint: &lt;/font&gt;&lt;font class= "hyzc-9" &gt; If you have already registered a member, please skip this step, Just click here &lt;/font&gt;&lt;/td&gt;


&LT;TD width= "248" &gt;&lt;form id= "Form1" Name= "Form1" method= "Post" action= "" &gt;


&lt;input type= "image" Name= "ImageField" src= "Images/hyzc-3.jpg"/&gt;


&lt;/form&gt;


&lt;/td&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "713" height= "&gt;&lt;/td&gt;"


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" align= "Center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "653" height= "1" class= "Hyzc-1-2" &gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "713" height= "&gt;&lt;/td&gt;"


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;form id= "Form2" name= "Formsignup" method= "POST" action= "" &gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "130" &gt;&lt;font class= "hyzc-1-1" &gt; Fill in Login name and password &lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font class= " Hyzc-6 "&gt;*&lt;/font&gt;&lt;/td&gt;


&LT;TD width= "align=" "right" &gt; Login name:&lt;/td&gt;


&LT;TD class= "Hyzc-1-5" &gt;


&lt;span class= "Framedivnormal" id= "Usrframediv" &gt;


&lt;input type= "text" name= "Usrinput" id= "Usrinput" class= "Hyzc-1-3" onkeyup= "checkusr (This.value); Changeusr ();" Onfocus= "CHECKUSR (this.value);" &gt;&amp;nbsp;&amp;nbsp;&lt;span id= "Usrinfodiv" class= "hyzc-6" &gt;&lt;/span&gt;&lt;/span&gt;


&lt;/td&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;tr&gt;&lt;tr height=30&gt;&lt;td class= "hyzc-7" &gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt; TD&GT;&LT;/TD&GT;&LT;TD valign=bottom&gt;&amp;nbsp;&amp;nbsp;&lt;input name= "checkbtn" type= "button" id= "Checkbtn" Onclick= "Loadcheck ()" value= "detects if user name is available" &gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span id= "Checkdiv" &gt;&lt;/span &GT;&LT;/TD&GT;&LT;TD class= "Hyzc-7" &gt;&lt;/td&gt;&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;&lt;tr&gt;&lt;td width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;&lt;td Width= "713" height= "8" &GT;&LT;/TD&GT;&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;&lt;/table&gt;

&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "165" &gt;&lt;/td&gt;


&LT;TD width= "Ten" &gt;&lt;font class= "hyzc-6" &gt;*&lt;/font&gt;&lt;/td&gt;


&LT;TD width= "align=" "right" &gt; enter login password:&amp;nbsp;&lt;/td&gt;


&lt;td&gt;&lt;span class= "Framedivnormal" id= "Pwdframediv" &gt; &lt;input name= "pwdinput" type= "password" Pwdinput "maxlength=" "onkeyup=" Checkpwd (this.value); "Onfocus=" checkpwd (this.value); "class=" Hyzc-1-3 "&gt;&amp; Nbsp;&amp;nbsp;&lt;span id= "Pwdinfodiv" class= "hyzc-6" &gt;&lt;/span&gt;


&lt;/span&gt;


&lt;/td&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;tr height=30&gt;&lt;td class= "hyzc-7" &gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt; /td&gt;&lt;td&gt;&lt;script language= "JavaScript" &gt;


var ps = new Passwordstrength ();


Ps.setsize ("200", "22");


&LT;/SCRIPT&GT;&LT;/TD&GT;&LT;TD class= "Hyzc-7" &gt;&lt;/td&gt;&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "713" height= "5" &gt;&lt;/td&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "165" &gt;&lt;/td&gt;


&LT;TD width= "Ten" &gt;&lt;font class= "hyzc-6" &gt;*&lt;/font&gt;&lt;/td&gt;


&LT;TD width= "align=" "right" &gt; enter password again:&amp;nbsp;&lt;/td&gt;


&LT;TD &gt;


&lt;span class= "Framedivnormal" id= "Repwdframediv" &gt;&lt;input name= "repwdinput" type= "password" id= "Repwdinput" Maxlength= "onkeyup=" Checkpwd2 (This.value), "onfocus=" Checkpwd2 (this.value); "class=" Hyzc-1-3 "&gt;&amp;nbsp; &amp;nbsp;


&lt;span id= "Repwdinfodiv" class= "hyzc-6" &gt;&lt;/span&gt;


&lt;/span&gt;


&lt;/td&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "713" height= "5" &gt;&lt;/td&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;

&lt;table width= "721" align= "Center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "653" height= "1" class= "Hyzc-1-2" &gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "713" height= "&gt;&lt;/td&gt;"


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "&gt;&lt;font" class= "hyzc-1-1" &gt; Fill out profile information &lt;/font&gt;&lt;/td&gt;


&LT;TD width= "Ten" &gt;&lt;font class= "hyzc-6" &gt;*&lt;/font&gt;&lt;/td&gt;


&LT;TD width= "align=" "right" &gt; Mailbox:&amp;nbsp;&lt;/td&gt;


&lt;td&gt;&lt;span class= "Framedivnormal" id= "Emlframediv" &gt;&lt;input name= "Emlinput" type= "text" id= "Emlinput" Onfocus= "Checkeml" (This.value), "onkeyup=" checkeml (This.value), "maxlength=" class= "Hyzc-1-3" &gt;&amp;nbsp; &amp;nbsp;


&lt;span id= "Emlinfodiv" class= "hyzc-6" &gt;&lt;/span&gt;


&lt;/span&gt;


&lt;/td&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "713" height= "5" &gt;&lt;/td&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "Ten" &gt;&lt;/td&gt;


&LT;TD width= "align=" "right" &gt; Sex:&lt;/td&gt;


&LT;TD width= "175" class= "hyzc-1-5" &gt;&lt;input "name=" "RadioButton" Type= "Radio" value= "RadioButton" Checked "/&gt;


Male &lt;input type= "Radio" name= "RadioButton" value= "RadioButton"/&gt;


Female &lt;/td&gt;


&LT;TD width= "270" &gt;&lt;/td&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "713" height= "&gt;&lt;/td&gt;"


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "Ten" &gt;&lt;/td&gt;


&LT;TD width= "align=" "right" &gt; Birth date:&lt;/td&gt;


&LT;TD width= "class=" "Hyzc-1-5" &gt;


&lt;select name= "Select" &gt;


&lt;option value= "1" &gt;1900&lt;/option&gt;


&lt;option value= "1" &gt;2009&lt;/option&gt;


&lt;/select&gt; year


&lt;select name= "Select" &gt;


&lt;option value= "1" &gt;01&lt;/option&gt;


&lt;option value= "1" &gt;02&lt;/option&gt;


&lt;option value= "1" &gt;03&lt;/option&gt;


&lt;option value= "1" &gt;04&lt;/option&gt;


&lt;option value= "1" &gt;05&lt;/option&gt;


&lt;option value= "1" &gt;06&lt;/option&gt;


&lt;option value= "1" &gt;07&lt;/option&gt;


&lt;option value= "1" &gt;08&lt;/option&gt;


&lt;option value= "1" &gt;09&lt;/option&gt;


&lt;option value= "1" &gt;10&lt;/option&gt;


&lt;option value= "1" &gt;11&lt;/option&gt;


&lt;option value= "1" &gt;12&lt;/option&gt;


&lt;/select&gt; Month


&lt;select name= "Select" &gt;


&lt;option value= "1" &gt;01&lt;/option&gt;


&lt;option value= "2" &gt;02&lt;/option&gt;


&lt;option value= "3" &gt;03&lt;/option&gt;


&lt;option value= "4" &gt;04&lt;/option&gt;


&lt;option value= "5" &gt;05&lt;/option&gt;


&lt;option value= "6" &gt;06&lt;/option&gt;


&lt;option value= "7" &gt;07&lt;/option&gt;


&lt;option value= "8" &gt;08&lt;/option&gt;


&lt;option value= "9" &gt;09&lt;/option&gt;


&lt;option value= "Ten" &gt;10&lt;/option&gt;


&lt;option value= "One" &gt;11&lt;/option&gt;


&lt;option value= "&gt;12&lt;/option&gt;"


&lt;option value= "&gt;13&lt;/option&gt;"


&lt;option value= "&gt;14&lt;/option&gt;"


&lt;option value= "&gt;15&lt;/option&gt;"


&lt;option value= "&gt;16&lt;/option&gt;"


&lt;option value= "&gt;17&lt;/option&gt;"


&lt;option value= "&gt;18&lt;/option&gt;"


&lt;option value= "&gt;19&lt;/option&gt;"


&lt;option value= "&gt;20&lt;/option&gt;"


&lt;option value= "&gt;21&lt;/option&gt;"


&lt;option value= "&gt;22&lt;/option&gt;"


&lt;option value= "&gt;23&lt;/option&gt;"


&lt;option value= "&gt;24&lt;/option&gt;"


&lt;option value= "&gt;25&lt;/option&gt;"


&lt;option value= "&gt;26&lt;/option&gt;"


&lt;option value= "&gt;27&lt;/option&gt;"


&lt;option value= "&gt;28&lt;/option&gt;"


&lt;option value= "&gt;29&lt;/option&gt;"


&lt;option value= "&gt;30&lt;/option&gt;"


&lt;option value= "&gt;31&lt;/option&gt;"


&lt;/select&gt; Day &lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "713" height= "&gt;&lt;/td&gt;"


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "Ten" &gt;&lt;font class= "hyzc-6" &gt;*&lt;/font&gt;&lt;/td&gt;


&LT;TD width= "align=" "right" &gt; Verification Code:&lt;/td&gt;


&LT;TD width= "112" class= "Hyzc-1-5" &gt;


&lt;input type= "text" name= "Reauthnum" class= "hyzc-1-6"/&gt; &lt;/td&gt;


&LT;TD width= "&gt;&lt;img" src= "Images/authimg.png" &gt;&lt;/td&gt;


&LT;TD width= "262" &gt;&lt;a href= "#" class= "hyzc-3" &gt; Can't see picture &lt;/a&gt;&lt;/td&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "713" height= "&gt;&lt;/td&gt;"


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" align= "Center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "653" height= "1" class= "Hyzc-1-2" &gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "713" height= "&gt;&lt;/td&gt;"


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "&gt;&lt;font" class= "hyzc-6" &gt;*&lt;/font&gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;input name=" Agree "type=" checkbox "class=" Hyzc-1-7 "value=" 1 "checked=" checked "onclick=" Isallow_jewellry () "/&gt;&lt;/td&gt;


&LT;TD width= "503" &gt; I have read and agreed to &lt;a href= "#" class= "hyzc-1-8" &gt; "People online Forum Network Service usage Agreement" &lt;/a&gt;&lt;/td&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "713" height= "&gt;&lt;/td&gt;"


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "558" &gt;&lt;textarea name= "textarea" class= "hyzc-1-9" readonly= "ReadOnly" &gt;


&lt;/textarea&gt;&lt;/td&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "713" height= "&gt;&lt;/td&gt;"


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;table width= "721" border= "0" align= "center" &gt;


&lt;tr&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;


&LT;TD width= "&gt;&lt;/td&gt;"


&LT;TD width= "&gt;&lt;/td&gt;"


&lt;td&gt;&lt;input type= "Submit" name= "Submit" value= "Submission Confirmation" tabindex= "1" onclick= ' Javascript:return checksignup () ' &gt;&lt;/td&gt;


&LT;TD width= "4" class= "Hyzc-7" &gt;&lt;/td&gt;

</tr>
</table>
<table width= "721" border= "0" align= "center" >
<tr>
<TD width= "4" class= "Hyzc-7" ></td>
<TD width= "713" height= "></td>"
<TD width= "4" class= "Hyzc-7" ></td>
</tr>
</table>
<table width= "721" align= "Center" >
<tr>
<TD class= "wn_login_02_06" ></td>
</tr>
</table>
</form>
</body>

The following JS file code


&lt;script language= "JavaScript" &gt;


Js/common.js


referencing js/css files;


function include (Path,type,title) {


var s,i,t;


if (Arguments.length &lt; 1) {


return;


}


if (arguments.length = = 1) {


Type = "JS";


}


Switch (Type.tolowercase ()) {


Case "CSS":


t = document.getElementsByTagName ("link");


for (i=0;i&lt;t.length;i++) {


if (t[i].href &amp;&amp; t[i].href.indexof (path)!=-1) {


Return


}


}


S=document.createelement ("link");


S.rel= "Alternate stylesheet";


S.type= "Text/css";


S.href=path;


S.title=title;


S.disabled=false;


Break


Case "JS":


Case "JavaScript":


Default


t = document.getelementsbytagname ("script");


for (i=0;i&lt;t.length;i++) {


if (t[i].src &amp;&amp; t[i].src.indexof (path)!=-1) {


Return


}


}


S=document.createelement ("script");


S.type= "Text/javascript";


S.src=path;


Break


}


var h=document.getelementsbytagname ("head") [0];


H.appendchild (s);


}


character processing;


Go to the left and right space;


function Trim (s) {


return RTrim (LTrim (s));


}


Go to the left space;


function LTrim (s) {


Return S.replace (/^s*/, "");


}


Go to the right space;


function RTrim (s) {


Return S.replace (/s*$/, "");


}


verification information;


null character value;


function IsEmpty (s) {


s = Trim (s);


return s.length = = 0;


}


Email


function Isemail (s) {


s = Trim (s);


var p =/^[_.0-9a-z-]+@ ([0-9a-z][0-9a-z-]+.) {1,4} [A-z] {2,3}$/i;


return P.test (s);


}


Digital


function Isnumber (s) {


return!isnan (s);


}


color value;


function IsColor (s) {


s = Trim (s);


if (S.length!=7) return false;


Return S.search (/#[a-fa-f0-9]{6}/)!=-1;


}


mobile phone number;


function IsMobile (s) {


s = Trim (s);


var p =/13d{9}/;


return P.test (s);


}


Id


function Iscard (s) {


s = Trim (s);


var p =/^d{15} (d{2}[xx0-9])? $/;


return P.test (s);


}


Url


function Isurl (s) {


s = Trim (s). toLowerCase ();


var p =/^http://[a-za-z0-9]+. [a-za-z0-9]+[/=?%-&amp;_~ ' @[] ': +!] * ([^&lt;&gt; ""]) *$/;


return P.test (s);


}


Phone


function Isphone (s) {


s = Trim (s);


var p =/^ ((d{3}) | ( d{3}-))? ((0d{2,3}) |0d{2,3}-)? [1-9]d{6,7}$/;


return P.test (s);


}


Zip


function Iszip (s) {


s = Trim (s);


var p =/^[1-9]d{5}$/;


return P.test (s);


}


Double


function Isdouble (s) {


s = Trim (s);


var p =/^[-+]?d+ (. d+)? $/;


return P.test (s);


}


Integer


function Isinteger (s) {


s = Trim (s);


var p =/^[-+]?d+$/;


return P.test (s);


}


中文版;


function Isenglish (s) {


s = Trim (s);


var p =/^[a-za-z]+$/;


return P.test (s);


}


Chinese


function Ischinese (s) {


s = Trim (s);


var p =/^[u0391-uffe5]+$/;


return P.test (s);


}


Double byte


function Isdoublechar (s) {


var p =/^[^x00-xff]+$/;


return P.test (s);


}


Contains Chinese characters


function Haschinesechar (s) {


var p =/[^x00-xff]/;


return P.test (s);


}


function Hasaccountchar (s) {


var p =/^[a-za-z0-9][a-za-z0-9_-]{0,15}$/;


return P.test (s);


}


function Limitlen (S,min,max) {


S=trim (s);


if (s== "") return false;


if ((s.length&lt;min) | | (S.length&gt;max))


return false;


Else


return true;


}


function


Delay event;


function Setdeferevent (type,action,time) {


if (Trim (time). length = = 0) time = 1;


if (typeof (Time)!= "number") time = 1;





Switch (Type.tolowercase ()) {


Case "Go":


Window.settimeout ("window.location= '" + Action + "" ", time);


Break


Case "alert":


Window.settimeout ("alert (' + action + ')", time);


Break


Case "JS":


Case "JavaScript":


Window.settimeout ("'" + action.tostring () + "", time);


Break


Default


Alert ("Nothing would do!");


Break


}


}


function Addloadlistener (handler) {


if (typeof Window.addeventlistener!= ' undefined ')


Window.addeventlistener (' Load ', handler, false);


else if (typeof document.addeventlistener!= ' undefined ')


Document.addeventlistener (' Load ', handler, false);


else if (typeof window.attachevent!= ' undefined ')


Window.attachevent (' onload ', handler);


};


function AddEventListener (element, EventType, handler, capture)


{


Try


{


if (Element.addeventlistener)


Element.addeventlistener (EventType, Handler, capture);


else if (element.attachevent)


Element.attachevent ("on" + EventType, handler);


}


catch (e) {}


};

function RemoveEventListener (element, EventType, handler, capture)


{


Try


{


if (Element.removeeventlistener)


Element.removeeventlistener (EventType, Handler, capture);


else if (element.detachevent)


Element.detachevent ("on" + EventType, handler);


}


catch (e) {}


};


Image


function Preloadimages () {


var d = document;


if (d.images) {


if (!d.p_i_a) d.p_i_a = new Array ();


var i,j=d.p_i_a.length,a=arguments;


for (i=0;i&lt;a.length;i++) {


d.p_i_a[j]= new Image ();


D.P_I_A[J++].SRC = A[i];


}


}


}


AJAX features;


function Loadajaxelement (e,u,p,f,l) {


if (Arguments.length &lt; 3) {


return;


}


o = $ (e);


o.innerhtml = l;


p = $h (P). toquerystring ();


New Ajax.updater (


{Success:e},


U


{method: ' Get ', Parameters:p, onfailure:f});


}


function Loadajaxdata (u,p,s,f) {


if (Arguments.length &lt; 3) {


return;


}


p = $h (P). toquerystring ();


New Ajax.request (


U


{method: ' Get ', Parameters:p, onsuccess:s,onfailure:f});


}


function Sendajaxelement (e,u,p,f,l) {


if (Arguments.length &lt; 3) {


return;


}


o = $ (e);


o.innerhtml = l;


p = $h (P). toquerystring ();


New Ajax.updater (


{Success:e},


U


{method: ' Post ', Parameters:p, onfailure:f});


}


function Sendajaxdata (u,p,s,f) {


if (Arguments.length &lt; 3) {


return;


}


p = $h (P). toquerystring ();


New Ajax.request (


U


{method: ' Post ', Parameters:p, onsuccess:s,onfailure:f});


}


&lt;/script&gt;

&lt;script language= "JavaScript" &gt;


Js/prototype.js


/*


This article you can go to the jquery website to download Oh. or to


Http://www.111cn.net/js/prototype.js Download


*/


&lt;/script&gt;


&lt;script language= "JavaScript" &gt;


Js/passwordstrength.js


Password strength;


function Passwordstrength (showed) {


this.showed = (typeof (showed) = = "Boolean")? Showed:true;


This.styles = new Array ();


This.styles[0] = {backgroundcolor: "#ebebeb", Borderleft: "Solid 1px #ffffff", BorderRight: "Solid 1px #bebebe", BorderBottom: "Solid 1px #bebebe"};


This.styles[1] = {backgroundcolor: "#ff4545", Borderleft: "Solid 1px #ffffff", BorderRight: "Solid 1px #bb2b2b", BorderBottom: "Solid 1px #bb2b2b"};


This.styles[2] = {backgroundcolor: "#ffd35e", Borderleft: "Solid 1px #ffffff", BorderRight: "Solid 1px #e9ae10", BorderBottom: "Solid 1px #e9ae10"};


This.styles[3] = {backgroundcolor: "#95eb81", Borderleft: "Solid 1px #ffffff", BorderRight: "Solid 1px #3bbc1b", BorderBottom: "Solid 1px #3bbc1b"};





this.labels= ["Weak", "medium", "strong"];

This.divname = "Pwd_div_" +math.ceil (Math.random () *100000);


This.minlen = 6;





This.width = "150px";


This.height = "16px";





This.content = "";





This.selectedindex = 0;





This.init ();


}


Passwordstrength.prototype.init = function () {


var s = ' &lt;table cellpadding= ' 0 "id=" ' +this.divname+ ' _table ' cellspacing= ' 0 "style=" width: ' +this.width+ '; height: ' + this.height+ '; ' &gt; ';


s + + ' &lt;tr&gt; ';


for (Var i=0;i&lt;3;i++) {


s + = ' &lt;td id= ' +this.divname+ ' _td_ ' +i+ ' width= ' 33% ' align= ' center ' &gt;&lt;span style= ' font-size:1px ' &gt;&amp; Nbsp;&lt;/span&gt;&lt;span id= "' +this.divname+ ' _label_ ' +i+ '" style= "Display:none;font-family:courier New, Courier, Mono;font-size:12px;color: #000000; " &gt; ' +this.labels[i]+ ' &lt;/span&gt;&lt;/td&gt; ';


}


s + + ' &lt;/tr&gt; ';


s + + ' &lt;/table&gt; ';


This.content = s;


if (this.showed) {


document.write (s);


This.copytostyle (This.selectedindex);


}


}


Passwordstrength.prototype.copytoobject = function (O1,o2) {


for (var i in O1) {


O2[i] = O1[i];


}


}


Passwordstrength.prototype.copytostyle = function (ID) {


This.selectedindex = ID;


for (Var i=0;i&lt;3;i++) {


if (i = = id-1) {


this.$ (this.divname+ "_label_" +i). style.display = "inline";


}else{


this.$ (this.divname+ "_label_" +i). Style.display = "None";


}


}


for (Var i=0;i&lt;id;i++) {


This.copytoobject (this.styles[id],this.$ (this.divname+ "_td_" +i). Style);


}


for (; i&lt;3;i++) {


This.copytoobject (this.styles[0],this.$ (this.divname+ "_td_" +i). Style);


}


}


passwordstrength.prototype.$ = function (s) {


return document.getElementById (s);


}


Passwordstrength.prototype.setsize = function (w,h) {


This.width = W;


This.height = h;


}


Passwordstrength.prototype.setminlength = function (n) {


if (isNaN (n)) {


return;


}


n = number (n);


if (n&gt;1) {


This.minlength = n;


}


}


Passwordstrength.prototype.setstyles = function () {


if (Arguments.length = = 0) {


return;


}


for (Var i=0;i&lt;arguments.length &amp;&amp; i &lt; 4;i++) {


This.styles[i] = arguments[i];


}


This.copytostyle (This.selectedindex);


}


Passwordstrength.prototype.write = function (s) {


if (this.showed) {


return;


}


var n = (s = = ' string ')? this.$ (s): s;


if (typeof (N)!= "Object") {


return;


}


n.innerhtml = this.content;


This.copytostyle (This.selectedindex);


}


Passwordstrength.prototype.update = function (s) {


if (S.length &lt; This.minlen) {


This.copytostyle (0);


Return


}


var ls =-1;


if (S.match (/[a-z]/ig)) {


ls++;


}


if (S.match (/[0-9]/ig)) {


ls++;


}


if (S.match (/. [ ^a-z0-9]) (/ig)) {


ls++;


}


if (S.length &lt; 6 &amp;&amp; ls &gt; 0) {


ls--;


}


Switch (LS) {


Case 0:


This.copytostyle (1);


Break


Case 1:


This.copytostyle (2);


Break


Case 2:


This.copytostyle (3);


Break


Default


This.copytostyle (0);


}


}


&lt;/script&gt;

reg.php
<?php

$a = "Wyjboy";
if ($a = = "$usr") {
echo 0;
}else{
Echo 1;
}
?>

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.