Using if(isset($_POST['submit'])) to not display echo when script is open is not working

后端 未结 7 550
走了就别回头了
走了就别回头了 2020-11-28 14:50

I have a little problem with my if(isset($_POST[\'submit\'])) code. What I want is some echos and a table to not appear when the script is open but I do want it

相关标签:
7条回答
  • 2020-11-28 15:16

    Whats wrong in this?

    <form class="navbar-form navbar-right" method="post" action="login.php">
      <div class="form-group">
        <input type="email" name="email" class="form-control" placeholder="email">
        <input type="password" name="password" class="form-control" placeholder="password">
      </div>
      <input type="submit" name="submit" value="submit" class="btn btn-success">
    </form>
    

    login.php

    if(isset($_POST['submit']) && !empty($_POST['submit'])) {
      // if (!logged_in()) 
      echo 'asodj';
    }
    
    0 讨论(0)
提交回复
热议问题