title: How may I put a $_POST data into a database table?
body: <p>It's been 3 weeks since I've started to learn symfony 4. I am trying to put the chosen data from the dropdown list into a database but I am not using a <code>Form builder</code> - the data is entered in html/twig and then stored into a variable <code>$value</code>.</p>
  
  <p>I am wondering, though, how can I put this data from the variable <code>$value</code> into a database of choice (table User)? I mean, (if understood it right) when I use the form builder I am supposed to use ObjectManager <code>$manager</code> as following:</p>
  
  <pre><code>$manager-&gt;persist($value);
  $manager-&gt;flush();
  </code></pre>
  
  <p>In this case I, honestly, have no idea of how I can put my data into a database.<br>
  Can anyone give me a clue?</p>
  
  <p><strong>twig</strong></p>
  
  <pre><code>&lt;select name="user"&gt;
      {% for user in users %}
          &lt;option value="{{ user.idUser }},{{ user.name }}" label="{{ user.name }} {{ user.surname }}"&gt;{{ user.name }} {{ user.surname }}&lt;/option&gt;
      {% endfor %}
  &lt;/select&gt;
  
  &lt;button type="submit" id="article_form_save" name="article_form[save]"&gt;ADD&lt;/button&gt;
  </code></pre>
  
  <p><strong>controller</strong></p>
  
  <pre><code>/**
   * @Route("/attribution", name="attribution")
   */
  public function create (Request $request) {
  
      $users = $this
          -&gt;getDoctrine()
          -&gt;getRepository(User::class)
          -&gt;findAll();
  
  
      $value = $_POST;  
  
      dump($value);
  
    return $this-&gt;render('database/Roles/attrib.html.twig', [
           'users' =&gt; $users
      ]);
  </code></pre>