PHP / AJAX pass a form input and select value to AJAX
<p>I have an HTML form and it contains basically of one input text box and one select...</p>

<p>Input box</p>

<pre><code>echo '&lt;input type="input" id="category_typex" name="category_typex" value="" /&gt;';
</code></pre>

<p>Select</p>

<pre><code>echo '&lt;select name="primary_cat" id="primary_cat" onChange="getSecondaryCat(this.value);"&gt;';
</code></pre>

<p>The Ajax code I'm using to pass the select is as follows:</p>

<pre><code>function getSecondaryCat(val, cat_var) {
$.ajax({
    type: "POST",
    url: "category-get-secondary.php",
    data:'secondary_cat='+val,
    success: function(data){
        $("#secondary_cat").html(data);
        $("#tertiary_cat").html('&lt;option value=""&gt;Select specific category&lt;/option&gt;')
    }
});
}
</code></pre>

<p>I'm not being able to pass both the select and input values onto the next page....</p>

<p>I'm only able to pass the select value and not the input value</p>