第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

即使已設(shè)置submit_registration_form_button,也將用戶重定向到

即使已設(shè)置submit_registration_form_button,也將用戶重定向到

PHP
肥皂起泡泡 2021-05-05 10:10:04
我正在為我的網(wǎng)站創(chuàng)建注冊系統(tǒng)。創(chuàng)建新帳戶時,用戶應(yīng)看到一條消息,即“成功創(chuàng)建了一個新帳戶”;如果無法創(chuàng)建該帳戶,則用戶應(yīng)看到一條消息,顯示“無法創(chuàng)建新帳戶”。我這樣做的目的是,如果用戶不按index.php上的“提交表單”按鈕,他們就會嘗試輸入websitename.com/verify_registration_form.php在搜索欄中,它們被重定向到index.php我的問題是,無論用戶是否按下了提交表單按鈕,該用戶都將重定向到index.php。這是index.php上的注冊表格<form action="verify_registration_form.php" method="post"><input type="username" id="user_name" name="user_name placeholder="Username" required><input type="password" id="user_pass_word" name="user_pass_word" placeholder="Password" required><input type="email" id="user_email" name="user_email" placeholder="Email" required><input type="submit" id="submit_registration_form_button" name="submit_registration_form_button" value="Sign Up"></form>這是我的verify_registration_form.php文件中的表單驗(yàn)證
查看完整描述

1 回答

?
慕工程0101907

TA貢獻(xiàn)1887條經(jīng)驗(yàn) 獲得超5個贊

這將檢查用戶是否已發(fā)布請求:


    if($_SERVER['REQUEST_METHOD'] != 'POST')

    {

        //user didn't press the register button

    }

    else

    {

        //user pressed the register button

    }


查看完整回答
反對 回復(fù) 2021-05-07
  • 1 回答
  • 0 關(guān)注
  • 203 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號