How Do I Pass a PHP Session Variable From Front End to Back End?

You were right @TomD… this code works!

<?php 
session_start();
if (empty($_SESSION['csrf_token'])) {
    $_SESSION['csrf_token'] = bin2hex(random_bytes(32));
}
?>