小编pti*_*nca的帖子

PHP $ _POST无法正常工作?

我有最简单的形式,我想做的就是回复文本框中写的任何内容.

HTML:

<form action="" method="post">
  <input type="text" name="firstname">
  <input type="submit" name="submit" value="Submit">
</form>
Run Code Online (Sandbox Code Playgroud)

PHP:

if(isset($_POST['submit'])){
  $test = $_POST['firstname'];
  echo $test;
}
Run Code Online (Sandbox Code Playgroud)

问题是它不能在我的服务器上运行(它可以在另一台服务器上运行).有没有人知道什么可能是错的?服务器上还有其他表单,工作正常.

html php forms post

8
推荐指数
5
解决办法
10万
查看次数

标签 统计

forms ×1

html ×1

php ×1

post ×1