Because my modal is not getting the post

Asked

Viewed 40 times

0

This is the code that receives the post

  <?php
 if (isset($_POST['idModal'])) {
          $result = mysqli_query($conn,
           $query="UPDATE tb_cartao
           SET mtpag=Cartão, doc='$_POST[docModal]' , nome='$_POST[nomeModal]', tpdesp='$_POST[tpdespModal]', fornecedor='$_POST[fornecedorModal]', centrocusto='$_POST[centrocusto]', dataemiss='$_POST[dataemissModal]', datavenc='$_POST[datavencModal]', val='$_POST[valModal]', parcela='$_POST[parcelaModal]', banco='$_POST[bancoModal]', cartao='$_POST[cartaoModal]', pag='$_POST[pagModal]' 
           WHERE id ='$_POST[idModal]'"); 
            mysqli_query($conn, $query); 
          ?>

          <div class="alert alert-success alert-dismissible">
              <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
              <h4><i class="icon fa fa-check"></i> Sucesso!</h4>
              O Cartao foi Alterado com sucesso!
      </div>`
  • 1

    Your question makes no sense. Read the [Ask] guide and see how to improve it. By the way, why run twice the mysqli_query? The first you catch the return on $result and the second you only perform. All very confusing.

  • Thank you for your remark

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.