title: How to fill in a text field with drop down selection
body: <p>I have a drop down with different strings, I want a text box to be filled in with the string of the drop down selected.</p>
  
  <p>I am writing this in html</p>
  
  <pre><code>&lt;td align="right"&gt;
          &lt;select name="xyz" size="1"&gt;
            &lt;option value=""&gt;&lt;/option&gt;
            &lt;?php foreach($comments as $comment): ?&gt;
              &lt;?if($comment-&gt;x!= 0):?&gt;
                &lt;option value="&lt;?=$comment-&gt;x;?&gt;"&lt;?=($comment-&gt;x == $postData["xyz"] ? 'selected="selected"':"")?&gt;&gt;
                     &lt;?=$comment-&gt;y;?&gt;
                &lt;/option&gt;
              &lt;?endif;?&gt;
            &lt;?php endforeach; ?&gt;
          &lt;/select&gt;
          &lt;textarea name="xz" cols="36" rows="3"&gt;&lt;?=$postData["xz"];?&gt;&lt;/textarea&gt;
  &lt;/td&gt;
  </code></pre>