Error message during registration-php Tutorial

Source: Internet
Author: User
Error message during registration
If ($ ucresult> 0) {echo"√ Available user name";} Elseif ($ ucresult =-1) {echo"× Invalid user name";} Elseif ($ ucresult =-2) {echo"× Contains the words to be allowed to be registered";} Elseif ($ ucresult =-3) {echo"× The user name already exists.";} Exit ();

How does one get like-1-2-3?


Reply to discussion (solution)

If ($ ucresult> 0) {echo"√ Available user name";} Elseif ($ ucresult =-1) {echo"× Invalid user name";} Elseif ($ ucresult =-2) {echo"× Contains the words to be allowed to be registered";} Elseif ($ ucresult =-3) {echo"× The user name already exists.";} Exit ();

How does one get like-1-2-3?
The following is the html code.
      Mobile phone number:        *  

This section of code is incomplete. the code for getting and converting should be included in the previous section.

If ajax is used, it is the return value of the request interface.

This may be the convention of the return values of the program specification, so we need to look up how this $ ucresult is assigned a value.

This may be the convention of the return values of the program specification, so we need to look up how this $ ucresult is assigned a value.

function uc_user_checkemail($email) {return call_user_func(UC_API_FUNC, 'user', 'check_email', array('email'=>$email));}

define('UC_API_FUNC', UC_CONNECT == 'mysql' ? 'uc_api_mysql' : 'uc_api_post');

function uc_api_mysql($model, $action, $args=array()) {global $uc_controls;if(empty($uc_controls[$model])) {include_once UC_ROOT.'./lib/db.class.php';include_once UC_ROOT.'./model/base.php';include_once UC_ROOT."./control/$model.php";eval("\$uc_controls['$model'] = new {$model}control();");}if($action{0} != '_') {$args = uc_addslashes($args, 1, TRUE);$action = 'on'.$action;$uc_controls[$model]->input = $args;return $uc_controls[$model]->$action($args);} else {return '';}}


This may be the convention of the return values of the program specification, so we need to look up how this $ ucresult is assigned a value.

function uc_user_checkemail($email) {return call_user_func(UC_API_FUNC, 'user', 'check_email', array('email'=>$email));}

define('UC_API_FUNC', UC_CONNECT == 'mysql' ? 'uc_api_mysql' : 'uc_api_post');

function uc_api_mysql($model, $action, $args=array()) {global $uc_controls;if(empty($uc_controls[$model])) {include_once UC_ROOT.'./lib/db.class.php';include_once UC_ROOT.'./model/base.php';include_once UC_ROOT."./control/$model.php";eval("\$uc_controls['$model'] = new {$model}control();");}if($action{0} != '_') {$args = uc_addslashes($args, 1, TRUE);$action = 'on'.$action;$uc_controls[$model]->input = $args;return $uc_controls[$model]->$action($args);} else {return '';}}
 $ucresult = uc_user_checkemail($email);

This may be because the return value of the program specification is customary, so we need to look up how this $ ucresult is assigned a value. you said that I don't understand these classes or anything. Is it true that I am a parallel programmer? Understand, but not write

A common value
You have to look at the function with the same name as the value of the constant UC_API_FUNC.
What will be the result of passing 'user', 'Check _ email ', array ('email' => $ email) into the file?
It may be traced up.

Check their manual for uc APIs and functions.

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.