用戶注冊(cè)頁面一直提示跨站禁止,已經(jīng)按要求添加了跨站驗(yàn)證內(nèi)容
<form id="register-form" class="member-form j-member-form" method="post">
{if in_array('username', $register.field)}
<div class="form-group" id="dr_row_username">
<label>
<i class="fa fa-user"></i> <input type="text" class="form-input require" name="data[username]" id="dr_username"
placeholder="賬號(hào)由字母或數(shù)字組成">
</label>
</div>
{/if}
{if in_array('email', $register.field)}
<div class="form-group" id="dr_row_email">
<label>
<i class="fa fa-envelope"></i> <input type="text" class="form-input require" name="data[email]" id="dr_email"
placeholder="請(qǐng)輸入有效郵箱接收賬號(hào)激活碼">
</label>
</div>
{/if}
{if in_array('phone', $register.field)}
<div class="form-group" id="dr_row_phone">
<label>
<i class="fa fa-mobile"></i>
<input type="text" class="form-input require" name="data[phone]" id="dr_phone" placeholder="請(qǐng)輸入手機(jī)號(hào)">
</label>
</div>
{/if}
{if $register.sms}
<div class="form-group sms-code" id="dr_row_sms">
<label><i class="fa fa-mobile"></i>
<input type="text" class="form-input require" autocomplete="off" id="dr_sms" name="sms" placeholder="請(qǐng)輸入驗(yàn)證碼"></label>
<button class="send-sms-code j-send-sms-code" onclick="dr_ajax_url('/index.php?s=member&c=api&m=register_code&id='+$('#dr_phone').val()+'&code='+$('#dr_code').val())"
type="button">獲取驗(yàn)證碼</button>
</div>
{/if}
<div class="form-group" id="dr_row_password">
<label>
<i class="fa fa-lock"></i> <input type="password" class="form-input require" name="data[password]" id="dr_password"
placeholder="請(qǐng)輸入登錄密碼">
</label>
</div>
<div class="form-group" id="dr_row_password2">
<label>
<i class="fa fa-unlock-alt"></i> <input type="password" class="form-input require" name="data[password2]" id="dr_password2"
placeholder="請(qǐng)驗(yàn)證登錄密碼">
</label>
</div>
{if $register.sms || $register.code}
<div class="form-group" id="dr_row_code">
<div class="input-group login-code">
<div class="input-icon">
<input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="驗(yàn)證碼" name="code">
</div>
<div class="input-group-btn fc-code">
{dr_code(120, 35)}
</div>
</div>
</div>
{/if}
<input type="hidden" name="{csrf_token()}" value="{csrf_hash()}" />
<div class="last" style="margin-top: 25px;">
<button type="button" onclick="dr_ajax_member('{dr_now_url()}', 'myform');" class="btn btn-login btn-block btn-lg">
提交注冊(cè)</button>
</div>
<div class="form-actions" style="margin-top:30px">
<div style="padding-left:0px;">
<label class="mt-checkbox mt-checkbox-outline" style="margin-left:0px;">
<input type="checkbox" name="is_protocol" value="1" checked> 我已閱讀并同意
<span></span><a href="javascript:dr_show_protocol();">《用戶注冊(cè)協(xié)議》</a>
</label>
</div>
</div>
</form>請(qǐng)教怎么解決
少了dr。form。hidden函數(shù)
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
1 少了dr。form。hidden函數(shù)
2 單擊按鈕的表單id參數(shù)與頁面的表單ID不匹配
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!