亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

SMS verification

After the verification code is generated through the ajax submission request, continue to use an ajax submission event, and compare the verification code entered by the user with the one received in the text message. If the verification code is correct, the registration is successful, and if it is incorrect, an error message will be returned

<?php
//點擊發(fā)送短信驗證碼
$.ajax({
    async : false,
    type: "get",
    url: "code.php", //
    data: {},
    success: function (data) {
        //發(fā)送短信驗證碼
        $.ajax({
            async : false,
            type: "post",
            url: "smsyzm.php", //
            data: {"yzm": data, 'yzmtel': $('#phone').val()},
            dataType: "json",
            success: function (data) {
            }
        });
    }
});

It should be noted here that continuous ajax requests need to be submitted asynchronously, otherwise the data may not be received (async: false)

Modify the smsyzm.php code to decrypt the code sent to the mobile phone

<?php
$param = base64_decode($_POST['yzm']);


The display results are as follows:

gif5新文件 (42).gif

Continuing Learning
||
<?php echo "短信驗證";
submitReset Code