title: Display database value in textarea when user select value from dropdown list
body: <p>My goal is it to print the data from the database into a textarea when user selects an item from the dropdown list.</p>
  
  <p>Display items from database in dropdown list:</p>
  
  <pre><code>    while($rows = $resultSet-&gt;fetch_assoc()){
              $dropdownItem = $rows['dropdownItem'];
              echo "&lt;option value='$dropdownItem'&gt;$dropdownItem&lt;/option&gt;";
  
      }
  </code></pre>
  
  <p>At least i managed to insert the text of one dropdown item into the textarea field</p>
  
  <pre><code>    var select = document.getElementById('select');
      var input = document.getElementById('textareID');  
      select.onchange = function(){
         input.value = select.value;
      }      
  </code></pre>
  
  <p>But actually I want to display the text from another tabelle in the database at the same time, when I'm pressing an option at the dropdown list.</p>