更改多个输入框时更新php变量

For a school project i have to build an website this website works with an API it collects data from the cloud ERP system. The query what is being send to the API needs to be updated when an input box changes.

<?php
  $genre = "*";
  $zaal = "*";
?>

For now i have set the variables i need to a wildcard(*) when a wildcard i deliverd to the API it does not matter what the value is. so a wildcard needs to be the default value.

<form class="w3-container">
    <p>
    <label>Genre:</label></br>
    <select class="w3-input" name="genre" id="genre">
      <option value="*" selected >Geen voorkeur</option>
      <option value="Cabaret">Cabaret</option>
      <option value="Circus">Circus</option>
    </select>
    </p>
    <p>
    <label>Zaal:</label></br>
    <select class="w3-input" name="zaal" id="zaal">
      <option value="*" selected >Geen voorkeur</option>
      <option value="Grote zaal">Grote zaal (900 zitplaatsen)</option>
      <option value="Philipszaal">Philipszaal (500 zitplaatsen)</option>
      <option value="Kameleon">Kameleon (120 zitplaatsen)</option>
    </select>
    </p>
</form>
<?php
  echo $api-data = file_get_contents("https://<mycompany>.yesplan.nl/api/events/date%3A%23nextyear%20location%3A".$zaal."%20profile%3A".$genre."?api_key=<mycompanyapikey>");
?>

I want that these variables change when the input changes how do i manage that?

These code is just a small part from the real site. the site is still in development if you want to see te page in action have a look over here if you head over to "adviesnavigator" you will see the sector it's all about. on the left te form which needs to be auto updated and on the right the page where the data needs to be from the API. Note: this data still needs to be filterd out to show the user only what they need to see!!!!

You can only do that by using a ajax call because you cannot reassign a php variable once the page is load. What you can do it you can make a ajax call can then fetch the data