title: To select the data in another textbox based on dropdown list in codeigniter
body: <p>i have one form in which,i want to select organization name then automatically need to display hq no of that organization name in another textbox,whether both are in same table.</p>
  
  <pre><code>                    &lt;div class="form-group"&gt;&lt;label for="orgName"&gt;Org Name&lt;/label&gt;
  
               &lt;select class="form-control required" id="orgName"name="orgName"&gt; &lt;option value="0"&gt;
                      Select Orgnization&lt;/option&gt;
        &lt;?php if(!empty($orgNames)){  foreach ($orgNames as $pl){ ?&gt;&lt;option value="&lt;?php echo $pl-&gt;customerId ?&gt;"&gt;&lt;?php echo $pl-&gt;orgName ?&gt;&lt;/option&gt;&lt;?php}?&gt; &lt;/select&gt;
         &lt;/div&gt;&lt;/div&gt;
  
                             &lt;div class="form-group"&gt;
                               &lt;label for="hqNo"&gt;HQ No.&lt;/label&gt;
                                      &lt;input type="text" class="form- control required" id="hqNo" name="hqNo" maxlength="128"&gt;
                                   &lt;/div&gt;
  </code></pre>