提交 PHP - 为什么不起作用?

Submit PHP - why isn't that working?

    <?php

if (isset($_POST['submit']))  {
   // I want to get here after pressing the Sign in button
}

if(!user::isLogged()){
echo '
          <form class="navbar-form navbar-right">
          <form method="POST">
            <div class="form-group">
              <input name="login" type="text" placeholder="Login" class="form-control">
            </div>
            <div class="form-group">
              <input name="password" type="password" placeholder="Password" class="form-control">
            </div>
            <button name="submit" type="submit" class="btn btn-success">Sign in</button>
          </form>
          </form>
';
}
?>

为什么提交按钮不起作用?

我该如何解决?我是网站编程的新手,我不知道这里出了什么问题。

if(!user::isLogged()){
echo '
          <form method="POST" class="navbar-form navbar-right">
            <div class="form-group">
              <input name="login" type="text" placeholder="Login" class="form-control">
            </div>
            <div class="form-group">
              <input name="password" type="password" placeholder="Password" class="form-control">
            </div>
            <button name="submit" type="submit" class="btn btn-success">Sign in</button>
          </form>
';
}
?>

您的 'form' 被声明为另一个 'method'。那是错误的。