Error notification during registration

Source: Internet
Author: User
if ($ucresult > 0)            {                echo "√ user name available ";            }            ElseIf ($ucresult = =-1)            {                echo "x username not valid ";            }            ElseIf ($ucresult = =-2)            {                echo "x contains the words to allow registration ";            }            ElseIf ($ucresult = =-3)            {                echo "x username already exists ";            }            Exit ();

Like this-1-2-3 How did he get here?


Reply to discussion (solution)

if ($ucresult > 0)            {                echo "√ user name available ";            }            ElseIf ($ucresult = =-1)            {                echo "x username not valid ";            }            ElseIf ($ucresult = =-2)            {                echo "x contains the words to allow registration ";            }            ElseIf ($ucresult = =-3)            {                echo "x username already exists ";            }            Exit ();

Like this-1-2-3 How did he get here?
Here is the HTML code
      Mobile number :        *  

This piece of code is incomplete, and there should be code to get and convert it before

If you're using AJAX, that's the return value of the request interface.

This may be the return value of the program specification. So I'm going to look up how this $ucresult is assigned.

This may be the return value of the program specification. So I'm going to look up how this $ucresult is assigned.

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 = $arg S;return $uc _controls[$model]-> $action ($args);} else {return ';}}


This may be the return value of the program specification. So I'm going to look up how this $ucresult is assigned.

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 = $arg S;return $uc _controls[$model]-> $action ($args);} else {return ';}}
$ucresult = Uc_user_checkemail ($email);

This may be the return value of the program specification. So, to look up the $ucresult is how to assign the value of the girl you said I do not understand these kinds of stuff. Does that mean I'm a parallel programmer? I know, but I just can't write.

It's a conventional value.
You have to look at the value of the constant Uc_api_func function with the same name
Put ' user ', ' check_email ', array (' email ' + $email) three to get in there.
may also be traced upward

UC APIs and functions check their manuals.

  • 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.