提交POST方法不调用PHP代码
我正在尝试让我的提交帖子方法工作。如果我输入用户名和密码,按钮就不会让我看到应该看到的回声。它根本没有显示任何东西。我还试着在我提交的帖子后加上一个回音,什么都没发生,我也看不出之前出了什么问题。我使用了一些网站,试图让它自己。我希望你们能帮助我 php:提交POST方法不调用PHP代码,php,Php,我正在尝试让我的提交帖子方法工作。如果我输入用户名和密码,按钮就不会让我看到应该看到的回声。它根本没有显示任何东西。我还试着在我提交的帖子后加上一个回音,什么都没发生,我也看不出之前出了什么问题。我使用了一些网站,试图让它自己。我希望你们能帮助我 php: html: <form action="" method="post"> <input type="Text" placeholder ="Enter Username" name="uname" required>
html:
<form action="" method="post">
<input type="Text" placeholder ="Enter Username" name="uname" required> <br />
<input type ="Password" placeholder ="Enter Password" name="psw" required> <br />
<button type="submit">Login</button>
</form>
登录
所有这些代码都在一个文档中您的代码中有一个空操作(
action=”“
)
实际上,您应该为php代码文件分配url
<form action="/your_path/your_php_file.php" method="post">
<input type="Text" placeholder ="Enter Username" name="uname" required> <br />
<input type ="Password" placeholder ="Enter Password" name="psw" required> <br />
<button type="submit">Login</button>
</form>
“提交”按钮中没有名称
<form action="/your_path/your_php_file.php" method="post">
<input type="Text" placeholder ="Enter Username" name="uname" required> <br />
<input type ="Password" placeholder ="Enter Password" name="psw" required> <br />
<button type="submit">Login</button>
</form>
<form method="post">
<input type="Text" placeholder ="Enter Username" name="uname" required> <br />
<input type ="Password" placeholder ="Enter Password" name="psw" required> <br />
<button type="submit">Login</button>
</form>