Fetching $_POST from Page Template into functions.php

Assign the value of you $_POST variable to a html element or javascript variable in front-page.php like

//html element

<input type="hidden" value="<?= $_POST['variable']?>" id="post-variable">

or in javascript variable

var postVariable = "<?= $_POST['variable']?>";

Now in ajax call, you can get the value as

var myValue = jQuery('#post-variable').val(); //if you set value to html element

or

var myValue = postVariable; //if you set the value in javascript variable.