You can declare these variables via input box (even hidden input) and using jQuery to grab all of these variables from the input boxes. It'll then seralize them and send them as an object to PHP via $_POST[];
If using this method, jQuery will be already doing the ajax work for you.
Lets say this for an example:
<form id="myForm">
<button><input type="text" id="name" class="form-control" placeholder="Upisi ime"></button>
<input type="hidden" id="presetName" name="javascriptVar">
</form>
<div id="result"></div>
and in your jQuery:
$('#myForm').submit( function() {
var name = "john";
$('#presetName').val(name); // inserting javascript's value
var senddata = ""; // grabbing all inputs from the form
senddata = $( this ).serialize(); // packing inputs up
$.ajax({
url: 'yourPHP.php',
type: 'POST',
data: senddata,
success: function(data)
{
$('#result').html('<p> Data sent:'+data+'</p>');
} //end of success
}); //end of ajax
event.preventDefault();
});// end submit