how to pass a parameter from JQUERY to PHP in order to update a session variable?
<p>I am trying to pass a selection/value from a dropdown menu which was dynamically created to php file and store it in a session variable, but the php is not getting any parameter.
This is my code in the Jquery file:</p>

<pre><code>$('#fgdesignation').change(function ()
            {
                var project =$("#fgdesignation option::selected").text();
                var url='backend.php';
             // alert(project);
            $.post(url, {fgdname : project});

        });
</code></pre>

<p>and this is the php file:</p>

<pre><code>if(isset($_POST['fgdname'])) {
    $fgdname= $_POST['fgdname'];
    $_SESSION['fgdname']=$fgdname;
}
</code></pre>

<p>Thank you!</p>
