PHP Project Development

Source: Internet
Author: User

PHP Project Development

===================================

val = $ (' #captcha '). Val (); Get DIV Content

Switch ($action) {
   Case ' Detail ':

Echo ' 111 ';
Break
   Case ' Agreement ':
Break
   Case ' Success ':

    Break
  Default
    Break
}

---------------------------------------------

function Dregister () {
var Val,len;
val = $ (' #username '). Val ();
len = val.length;
if (Len < 5 | | len > 16) {
Dtoast ('member name length limitis 5-16 ');
return false;
}
if (Val.indexof (' __ ')! =-1 | | val.indexof ('--')! =-1) {
Dtoast ('the underscore and underline in the member name cannot appear consecutively‘);
return false;
}
if (!val.match (/^[a-z0-9]{1}[a-z0-9_\-]{0,}[a-z0-9]{1}$/)) {
Dtoast ('the membership name is limited to lowercase letters, number combinations‘);
return false;
}
val = $ (' #password '). Val ();
len = val.length;
if (Len < {$MOD [Minpassword]} | | len > {$MOD [Maxpassword]}) {
Dtoast (' Password length is limited to {$MOD [minpassword]}-{$MOD [Maxpassword]} ');
return false;
}
val = $ (' #email '). Val ();
len = val.length;
if (Len < 7 | |!val.match (/^[\w\-\.) [Email protected] [\w\-\.] + (\.\w+) +$/)) {
Dtoast ('please fill in the correct e-mail‘);
return false;
}
{if $itemid > 5}
val = $ (' #company '). Val ();
len = val.length;
if (Len < 4) {
Dtoast ('please fill in the company name‘);
return false;
}
{/if}
val = $ (' #truename '). Val ();
len = val.length;
if (Len < 2) {
Dtoast ('please fill in your real name‘);
return false;
}
{if $verify _type== ' mobile '}
val = $ (' #mobile '). Val ();
if (!val.match (/^1[3|4|5|7|8]{1}[0-9]{9}$/)) {
Dtoast ('please fill in the correct mobile phone number‘);
return false;
}
{/if}
{if $MOD [Captcha_register]}
val = $ (' #captcha '). Val ();
if (!is_captcha (val)) {
Dtoast (' Please fill in the Verification Code ');
return false;
}
{/if}
$.post (' register.php ', $ (' #dform '). Serialize (), function (data) {
if (data = = ' OK ') {
Go (' register.php?action=success ');
} else if (data = = ' Group ') {
Dtoast (' Please select a member group ');
SetTimeout (function () {
Go (' register.php?reload={$DT _time} ');
}, 1000);
} else if (data = = ' Passport ') {
Dtoast (' member name has been registered ');
$ (' #username '). Val (');
} else if (data = = ' Captcha ') {
Dtoast (' captcha error ');
Reloadcaptcha ();
} else {
data = Data.replace (' nickname ', ' member ');
alert (data);
Dtoast (data);
}
});
Return
}

===========================

PHP Project Development

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.