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)
}
});
});