title: Fetch value from Database and fill all textbox if dropdown value change
body: <p>I am trying to fill all textbox value depend on dropdown value selection. And I also fill dropdown value by SQL query. Here is HTML Code:</p>
  <pre><code>&lt;select name=&quot;name&quot; ID=&quot;name&quot; class=&quot;form-control&quot;&gt;
  &lt;option value=&quot;Select&quot;&gt;Select&lt;/option&gt;
  &lt;?php
  $qu=&quot;Select DISTINCT Cname from Client_table&quot;;
  $res=mysqli_query($con,$qu);
  while($r=mysqli_fetch_row($res))
  { 
      echo &quot;&lt;option value='$r[0]'&gt; $r[0] &lt;/option&gt;&quot;;
                                              
  }
  ?&gt; 
  &lt;/select&gt;
  &lt;label&gt;Address&lt;/label&gt;&lt;input type=&quot;text&quot; name=&quot;add&quot;/&gt;
  &lt;label&gt;Contact&lt;/label&gt;&lt;input type=&quot;text&quot; name=&quot;con&quot;/&gt;
  </code></pre>
  <p>DataBase:</p>
  <pre><code>  Client_table
     C_no             Cname           Caddress          Ccontact
      1               Mohit             xyz             0123645789
      2               Ramesh            abc             7485962110
  </code></pre>
  <p>Here I am confused that how to find address and contact of a client based on dropdown selection and fill textbox with this values</p>