Jquery Adding an "Other" to a form - Passing correct Variable into database
<p>I am using Select in a form and have the "Other" option that displays the "Other" text input box. However I only want to save the actual value in the same column in my table so I need to make sure the "value" of the "Other" text input gets passed to the MySQL table not the content of the selected which is obviously "Other"</p>

<pre class="lang-html prettyprint-override"><code>&lt;div&gt;
  &lt;select class="element select small" id="prop_title" name="prop_title"&gt;
    &lt;option value="Mr" &gt;Mr&lt;/option&gt;
    &lt;option value="Mrs" &gt;Mrs&lt;/option&gt;
    &lt;option value="Sir" &gt;Sir&lt;/option&gt;
    &lt;option value="Lord" &gt;Lord&lt;/option&gt;
    &lt;option value="Other"&gt;Other&lt;/option&gt;
  &lt;/select&gt;
  &lt;div id="prop_title_other" style="display: none; margin-top:15px;"&gt;
    &lt;label class="description" for="prop_title"&gt;Proprietor Title (Other)&lt;/label&gt;
    &lt;input type="text" id="prop_title" class="element text small" value=""/&gt;
  &lt;/div&gt;
&lt;/div&gt; 
</code></pre>

<pre class="lang-js prettyprint-override"><code>$('#prop_title').change(function() 
{
  $('#prop_title_other').css('display', ($(this).val() == 'Other') ? 'block' : 'none');
});
</code></pre>
