title: Populate input field from a dropdown using codeigniter
body: <pre><code>chapter_number | chapter_title |
         1       | Introduction  |
         2       | Number System |
  
  
  &lt;select type="text" name="chapter_number" class="form-control form-control-line" value=""&gt;
      &lt;option selected="option" disabled="selected"&gt;Select&lt;/option&gt;   
      &lt;option value="1"&gt;1&lt;/option&gt;
      &lt;option value="2"&gt;2&lt;/option&gt;
  &lt;/select
  
  &lt;input type="text" name="chapter_title" id="title" class="form-control"/&gt;
  </code></pre>
  
  <blockquote>
    <p>above is my table and next is my code the select option and the input field. I want that when I select '1' automatically the input field will print chapter title 'Introduction' and If I select '2' the input field will became 'Number System'.</p>
  </blockquote>