Since I cannot comment due to reputation, I suggest you a solution that through jQuery you can append this to your current form as hidden fields and these get submitted at the PHP backend and you can save it in your DB.
Let me know if you need help on how to append it to the form.
var name = $("<input type='hidden' name='whatever' value='micheal' />");
$("#myform").append(name);
Also have a look at this
Add elements using jQuery dynamically
To process this in PHP see this,
$variable_name_1 = $_POST['name_of_form_field_1'];
$variable_name_2 = $_POST['name_of_form_field_2'];
//Read how to sanitize variables
$query = "INSERT INTO table_name (field1, field2) VALUES ('$variable_name_1', '$variable_name_2')";
$result = mysqli_query($query);
if(!$result) {
echo "Error" . mysqli_error();
}
else {
echo "Done!";
}
You can have a snapshot of your form submitted by doing this var_dump($_POST)