Ajax (POST) Help Needed

Ajax (POST) Help Needed


Can some please direct me in the right direction? Here's what's going
on, I'm trying to pass a value from a select / option field to be
processed by a PHP script that will populate a pulldown menu. The
value will then be processed into a MySQL query, if the query contains
results it will populate select / option field.
According to firebug, my request is being passed. From firebug:
file => packageNames.php
SELECT package_id, package_name FROM proposal_packages WHERE cid =
"1" GROUP BY package_name
<div id="pkg"></div>

Package Name Test<label>Names</label>
<select id="NameDropDown" name="package_id"><option value="31">Test</
option></select>
I'm including (include PHP function) the packageNames.php file into
newproposal.php.
include('include/packageNames.php');
However on the page that is being displayed the query is empty and the
select / option fields are empty too.
file=> newproposal.php
SELECT package_id, package_name FROM proposal_packages WHERE cid = ""
GROUP BY package_name
What am I doing wrong? Honestly, I not all that jquery savvy. Any
help would be outstanding! My jquery code is below.
My jQuery
$(document).ready(function() {
$("select#cid").change(function() {
        showCIDValue();
});
    function showCIDValue() {
        var cid = $('select#cid').val();
        $.ajax({
            type: "POST",
            url: "include/packageNames.php",
            data: "cid=" + cid,
            beforeSend: function() {
                $('#pkg').html('loading...');
               },
            dataType: "html",
            success: function() {
                adjustNameDropDown();
            },
            error: function() {
                $('#pkg').html('error...');
               },
     });
    }
    function adjustNameDropDown() {
    var cid = $('select#cid').val();
        if (cid.length == 0) {
            $('#NameDropDown').attr("disabled",true);
        } else {
            $('#NameDropDown').attr("disabled",false);
        }
    }
});