title: write in database (php/mySQL)
body: <p>The problem is very simple
  (and everything, php and html is on one file(.php))</p>
  <pre><code>&lt;?php
      try {
          $bdd = new PDO('mysql:host=localhost;dbname=dlp;charset=utf8', /*the PDO works*/);
      } catch(Exception $e) {
          die('Erreur : '.$e-&gt;getMessage());
      }
  
      if(isset($_POST[&quot;name&quot;], $_POST[&quot;pass&quot;], $_POST[&quot;mail&quot;]) 
          &amp;&amp; !empty($_POST[&quot;name&quot;]) &amp;&amp; !empty($_POST[&quot;pass&quot;]) &amp;&amp; !empty($_POST[&quot;mail&quot;])) { //that works
          
          if(!filter_var($_POST[&quot;mail&quot;], FILTER_VALIDATE_EMAIL)) { //that works
              die(&quot;adresse email invalide&quot;);
          }
          $name=strip_tags(($_POST[&quot;name&quot;]));    //that works
          $pass=password_hash($_POST[&quot;pass&quot;], PASSWORD_ARGON2ID);    //that works
          $stmt=&quot;INSERT INTO `users` 
                          (`name`, `pass`, `mail`, `role`) 
                  VALUES (:name, '$pass', :mail, '[\&quot;ROLE_USER\&quot;]')&quot;;
          $query=$bdd-&gt;prepare($stmt);
              $query-&gt;bindvalue(':name', $name);
              $query-&gt;bindvalue(':mail', $_POST[&quot;mail&quot;]);
  
          $query-&gt;execute();
     }else{
         die('formulaire incomplet');
      }
  ?&gt;
  </code></pre>
  <p>html part:</p>
  <pre><code>
  &lt;/div&gt;
      &lt;form method=&quot;post&quot;&gt;
  
          &lt;section class=&quot;formulaireTitreCulture&quot;&gt;
              &lt;label for=&quot;name&quot;&gt;name&lt;/label&gt;
              &lt;input type=&quot;name&quot; name=&quot;name&quot;&gt;&lt;/input&gt;
          &lt;/section&gt;
  
          &lt;section class=&quot;formulaireTitreCulture&quot;&gt;
              &lt;label for=&quot;motdepasse&quot;&gt;Mot de passe&lt;/label&gt;
              &lt;input id=&quot;motdepasse&quot; name=&quot;pass&quot;&gt;&lt;/input&gt;
          &lt;/section&gt;
  
          &lt;section class=&quot;formulaireTitreCulture&quot;&gt;
              &lt;label for=&quot;&quot;&gt;Mail&lt;/label&gt;
              &lt;input name=&quot;mail&quot; id=&quot;mail&quot;&gt;
          &lt;/section&gt;
          &lt;input type=&quot;submit&quot; value=&quot;Envoyer&quot;&gt;
      &lt;/form&gt;
  &lt;/div&gt;      
  </code></pre>
  <p>the result is die('formulaire incomplet');,and nothing is written in the database, i don't see why.
  Any clue is welcome! thanks by advance</p>