loaded PHP file not able getting $_GET variable but include PHP can get $_ GET variable

one text

I have navigation that loads a PHP file into a div. That works fine, except I need a variable that has been posted from a selector menu that creates the variable and and loads the PHP file into a div on the page. If I include the same file it will pull the variable from the URL no problem.

Here is the function that loads the file

function sectionTime(val){
        switch (val){
            case 0:
            **$("#loadArea").load('allProjects.php');**
            break;
                
            case 1:
             $("#loadArea").load('allClients.php');
            break;
                
            case 2:
             $("#loadArea").load('allDocuments.php');
            break;
        }
};

In the allProjects.php file I am trying to get the variable from the URL string

<? 
$myYear2 = $_GET['myYear'];
echo ("myYear from GET - ".$myYear2);
?>  

But it is not retrieving the $myYear variable in the URL string.

If I go directly to the allProjects.php file in the browser it all works perfectly.

Thoughts?

Thanks in advance.

Source