title: passing value from combobox with ajax to another php page
body: <p>change functions are for the selected item on combobox. Input is the textbox. When the lastly entered value to textbox variables are successfully sending the javascript variables but the alert returns nothing when its show.</p>
  
  <pre><code>&lt;script&gt;
  $(function(){
  $("#classroom").on("change", function() {
       $("#segment_course").show();
        });
  $("#course").on("change", function() {
       $("#segment_time").show();
        });
  $("#time").on("change", function() {
       $("#segment_duration").show();
        });
      var e= document.getElementById("classroom");
      var selectclass= e.options[e.selectedIndex].value;
     var f= document.getElementById("course");
      var selectcourse= f.options[e.selectedIndex].value;
      var g= document.getElementById("duration");
      var drtion= g.value;
  $("#duration").on("input", function() {  
    $.ajax({
        type: "GET",
        url: 'classroom_add.php',
        data: ({selectedclass:selectclass,selectedcourse:selectcourse,courseduration:drtion}),
        success: function(data) {
          alert(data);
        }
      }); 
    });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>this is the classroom_add.php its not showing anything also</p>
  
  <pre><code>$classroom=$_GET['selectedclass'];
  $course=$_GET['selectedcourse'];
  $duration=$_GET['drtion'];
      echo $classroom;
      echo $course;
      echo $duration;
  </code></pre>