亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

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

無法識別 PHP 索引(post 方法)

無法識別 PHP 索引(post 方法)

PHP
互換的青春 2023-04-21 16:44:37
我是 php 的新手,仍處于學習階段。我輸入了一個 1 到 1 的小腳本,結果發現我的 HTML 文件中的索引在 php 中無法識別。在給定的視頻中使用了“GET”方法,但它實際上應該以完全相同的方式工作。它只是一個測試腳本。盡管如此,一個答案會有所幫助。這是我的腳本:HTML:<form id="register-form" action="Memeon.php" method="post">    <img class="register_avatar" src="pictures/login_register_avatar.png" oncontextmenu="return false;">    <h2>Welcome to Memeon</h2>    <div class="reg-input-div one">        <div class="i">          <i class="fas fa-user"></i>        </div>        <div>            <h5>Username</h5>            <input id="reg_un" class="reg-input" name="username" type="text" autocorrect="off" autocapitalize="off" spellcheck="false">        </div>    </div>    <div class="reg-input-div two">        <div class="i">            <i class="fas fa-at"></i>        </div>        <div>            <h5>Email-Adress</h5>            <input id="reg_ea" class="reg-input" name="email" type="email" autocorrect="off" autocapitalize="off" spellcheck="false">        </div>    </div>    <div class="reg-input-div three">        <div class="i">            <i class="fas fa-lock"></i>        </div>        <div>            <h5>Password</h5>            <input id="reg_pw" class="reg-input" name="password" type="password" autocorrect="off" autocapitalize="off" spellcheck="false">        </div>    </div>    <a id="rl_l1" href="#">2-Factor-Authentication</a>    <a id="rl_l2" href="#">Forgot Password?</a>    <input type="submit" onclick="setRegisterInfo()" class="register_btn" value="Sign in"></form>PHP:<?php  echo "Hallo ". $_POST["username"];?><br>Der sehnlichst erwünschte Newsletter wird gesendet an <?php echo $_POST["email"]; ?>兩者都在同一個文件夾中。通過提交按鈕,我進入了 PHP 頁面。錯誤總是出現在那里。
查看完整描述

1 回答

?
慕運維8079593

TA貢獻1876條經驗 獲得超5個贊

也許它必須與最后提交輸入的“onclick”屬性中的“setRegisterInfo()”函數中的某些內容(是否已實現?如果是,您也應該將其張貼在這里:))。如果該功能中斷,則不會提交表單。

<input type="submit" onclick="setRegisterInfo()" class="register_btn" value="Sign in">

沒有那個功能再試一次。

<input type="submit" class="register_btn" value="Sign in">


查看完整回答
反對 回復 2023-04-21
  • 1 回答
  • 0 關注
  • 129 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號