Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

141
Visualizações
why using formdata only take old information? not the new information updated on inputs

Im filling this form with data from the database with php. This is a form to edit previous entered data.

<form action="" id="myForm" title="myForm">

    <?php
    $query = "SELECT * FROM case_info LIMIT 1";
    $result = myqsl_query($query) or die(mysql_error());
    while($row = mysql_fetch_array($result)){
    ?>
    <input type="text" id="volunteer" value="<?php echo $row['Volunteer']; ?>"
    <input type="text" id="CaseShortTitle" value="<?php echo $row['CaseShortTitle']; ?>"
    <?php
    } //Close while{} loop
    ?>

Save

the problem cam when I send the data with the Formdata with Jquery. whe I edit some value in some input and send it again it send the old data, no the one im editing here. So form data works well when you are inserting new data but do not work taking updated information I edit in the inputs.

$('#saveOrderBtn').click(function() {
   var form = $('#formOrder')[0];
   var formData = new FormData(form);

    $.ajax({
        type: "POST",
        url: "../classes/upd_order.php",
        processData: false,
        contentType: false,
        cache: false,
        data: formData,
        success: function(data){
          console.log(data)

        },
        error: function(data) {
          console.log(data)
        }
    });

});

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda