title: How to change status of one problem so it can be moved to other section, for example section of problems solved?
body: <p>I am trying to pass 1 unresolved problem to a section called "resolved", ie someone sent from your problem forms that you are having, then in the admin part I have the problems all that have already been created and I want to send to another section those that are already solved, that is, I have 2 sections, an "unresolved" call and another called "resolved", clicking on a problem opens a modal only with information of the problem itself and within the modal I want to have a button that when clicking passes the problem to the section of solved problems. To do a modal for each problem I used javascript from the bootstrap, but I do not know how to say I just want to drag problem x to the other section. For this I created a function with sql to change the state of the problem to "solved" and also record the name of the administrator who solved it. I'll show the code of the modal structure, javascript and function.</p>
  
  <pre><code>&lt;td&gt;&lt;button data-toggle="modal" data-target="#dataModal" data-estado="&lt;?php echo $data['estado'];?&gt;" data-nome="&lt;?php echo $data['nome'];?&gt;" data-assunto="&lt;?php echo $data['assunto'];?&gt;" data-msg="&lt;?php echo $data['msg'];?&gt;" data-img="&lt;?php echo $data['img'];?&gt;" class="button1"&gt;Analisar&lt;/button&gt;&lt;/td&gt;
  </code></pre>
  
  <pre><code>&lt;div class="modal-footer"&gt;
      &lt;form method="post"&gt;
          &lt;input  type="submit" name="submit" value="Resolvido"&gt;
      &lt;/form&gt;
      &lt;?php                 
          if(isset($_POST['submit'])){
              $id = $data['id'];
              resolvido($_SESSION['UserNome'],$id);
          }       
      ?&gt;
  &lt;/div&gt;      
  </code></pre>
  
  <p>In this part has a button, appears in front of each problem of this button and when clicking opens the modal only with information of problem x. And in the body of the modal has php code to try to do such dragging.</p>
  
  <p>===========================================================================</p>
  
  <pre><code>&lt;script&gt;
              $('#dataModal').on('show.bs.modal', function (event) {
                  var botao = $(event.relatedTarget) // Botão que faz o modal abrir
                  // Extract info from data-* attributes
                  var id = botao.data('id')
                  var estado = botao.data('estado') 
                  var nome =  botao.data('nome')
                  var assunto = botao.data('assunto')
                  var msg = botao.data('msg')
                  var img = botao.data('img')
                  var modal = $(this)
                  modal.find('.modal-body').html('&lt;div class="container"&gt; &lt;i&gt;&lt;h2 class="cor2"&gt;Estado -&gt;' + estado + ' &lt;/h2&gt;&lt;i&gt; &lt;h3 class="cor2"&gt;Nome -&gt;'+ nome + '&lt;/h3&gt; &lt;h4 class="cor2"&gt;' + assunto + ' &lt;/h4&gt; &lt;p class="cor2"&gt;' + msg + ' &lt;/p&gt; &lt;img class="responsive" src="imagens/' + img + '" /&gt; &lt;/div&gt;');
              })
  &lt;/script&gt;
  </code></pre>
  
  <p>In this part has the script to open the modal only with the information of problem x.</p>
  
  <p>===========================================================================</p>
  
  <pre><code>function resolvido($estado,$admin,$problemaId){
      global $connection;
      //Consulta
      $sql = "UPDATE `contacto` SET `estado` = '$estado', admin = '$admin' WHERE `id` = '$problemaId'";
      mysqli_query($connection,$sql);
  }
  </code></pre>
  
  <p>In this last part has the function that I called in the modal body ...
  Help me please...</p>