title: Display related data from database based on dropdown selection JavaScript
body: <p>In my task I want to select one name from drop down. Then I want to print the technology related to that name in other div tag. I don't know how to do this. I successfully get data from data base for dropdown option. Here is my code. </p>
  
  <pre class="lang-html prettyprint-override"><code>candidate name:
  &lt;select name="candidate_id" class="form-control" id="can_name" value="&lt;?php echo set_value('candidate_id');?&gt;"palceholder="candidate full name" required&gt;
      &lt;option&gt;&lt;/option&gt;
      &lt;?php foreach ($candidate as $r): ?&gt;
          &lt;option value="&lt;?php echo $r-&gt;candidate_id; ?&gt;"&gt;&lt;?php echo $r-&gt;candidate_name." "; ?&gt;&lt;/option&gt;
      &lt;?php endforeach; ?&gt;
  &lt;/select&gt;
  &lt;/select&gt;
  
  &lt;div class="error"&gt;&lt;?php echo form_error("candidate_name");?&gt;&lt;/div&gt;&lt;br&gt;
  &lt;div&gt;&lt;/div&gt;&lt;br&gt; &lt;!-- here I want to print technology related to canididate name --&gt;
  </code></pre>