Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

143
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda