title: A form on Chrome work only when I add the value="" attribute in the input
body: <p>I have an issue and I can't find any solution since 3 hours now,</p>
  <p>I have a simple html login form that leads to a php script that checks if the account exists.</p>
  <p>Everything works perfectly when on my &quot;Username&quot; and &quot;Password&quot; fields I indicate data in the &quot;value&quot; attribute, but when I type the username and password myself, the page loads to the infinite and I don't understand why at all.</p>
  <p>Btw, it seems that it work fine with Edge.</p>
  <pre><code>&lt;form class=&quot;mb-0&quot; action=&quot;http://www.localhost:80/cms/controller/loginController.php&quot; method=&quot;POST&quot;&gt;
  
  &lt;label for=&quot;login-form-username&quot;&gt;Nom d'utilisateur&lt;/label&gt;
  &lt;input type=&quot;text&quot; id=&quot;login-form-username&quot; name=&quot;username&quot; required=&quot;required&quot;  class=&quot;form-control&quot;&gt;
  
  &lt;label for=&quot;login-form-password&quot;&gt;Mot de passe&lt;/label&gt;
  &lt;input type=&quot;password&quot; id=&quot;login-form-password&quot; name=&quot;password&quot; required=&quot;required&quot;  class=&quot;form-control&quot;&gt;
  
  &lt;input type=&quot;submit&quot; class=&quot;button button-3d button-black m-0&quot; id=&quot;login-form-submit&quot; name=&quot;login&quot; value=&quot;Connexion&quot;&gt;
  &lt;a href=&quot;#&quot; class=&quot;float-right&quot;&gt;Mot de passe oublié&lt;/a&gt;&lt;/form&gt;
  </code></pre>
  <p>If I add value=&quot;admin&quot; for username and value=&quot;1234&quot; for password and I submit the form, it works fine.</p>
  <p>My loginController.php script:</p>
  <pre><code>if(isset($_POST['login'])) {
      if(isset($_POST['username']) &amp;&amp; isset($_POST['password'])) {
  
          $username = stripslashes(strip_tags($_POST['username']));
          $password = saltAndCrypt($_POST['password']);
  
          $stmt = $pdo-&gt;prepare('SELECT * FROM users WHERE UserName = :UserName AND UserPassword = :UserPassword');
          $stmt-&gt;execute(array(':UserName' =&gt; $username, ':UserPassword' =&gt; $password));
  
          if($stmt-&gt;rowCount() &gt; 0) {
              $userInfos = $stmt-&gt;fetch();
              $user = new User();
              $user-&gt;login($userInfos['UserID']);
              exit;
          } else {
              $flash-&gt;addFlashMessage('Mot de passe incorrect', &quot;danger&quot;);
              $_SESSION['captchaLogin'] = time() + 30;
          }
  
      }
  }
  </code></pre>
  <p>And the function $user-&gt;login should connect the user and redirect him on the dashboard. The function works fine cause when I try it manually, it works fine.</p>
  <pre><code>    public function login($user_id, $params = null){
      global $pdo;
      global $flash;
  
      if(isset($_SESSION['user']))
          unset($_SESSION['user']);
  
      $stmt = $pdo-&gt;prepare('SELECT * FROM users WHERE UserID = :UserID');
      $stmt-&gt;execute(array(':UserID' =&gt; $user_id));
      $row = $stmt-&gt;fetch();
  
      $UserID = $row['UserID'];
  
      $_SESSION['user']['pseudo'] = $row['UserName'];
      $_SESSION['user']['auth'] = $UserID;
      $_SESSION['user']['rang'] = $row['UserLevel'];
  
      header(&quot;Location: &quot;.PATH_SOURCE_ESPACE_CLIENT.LIEN_HOME_CONNECTED);
      return true;    
  }
  </code></pre>
  <p>Can somebody see what is the issue here?</p>