I want to make a POST request, and I am confused with the "Data". My idea is to store the data by current day. The values that I need to store are "form", sunbed color "actual_step" and "total_sold". I want that when I select a past day and do a "Get", the data of that day appears.
Work: codepen work
var conection;
Ajax code;
$.ajax({
type: "POST",
url: '../cr4id3r/sunbeds/blob/5875a09c7e6bdb9d8e3bb43f58ecf0d840395111/Conection.php',
data:{
("#current_date")
$('#form').serialize();
"actual_step": actual_step;
"total_sold": total_sold;
},
dataType:"String"
},
success: function (data) {
alert(data.Message);
},
error: function () {
alert("Error!!!");
}
});
return false;
});