Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

132
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!