title: How to fill the values in a textbox using Ajax or Jquery?
body: <p>Example- Consider three textboxes. In the first one, im providing ID or number ( primary key in my table). Using the ID, the semester and branch should be auto filled using the ID. ( All the three fields are in same table- in my DB).
  HTML part:</p>
  
  <pre><code>&lt;input type='text'  name='hosteladmissionno'&gt;
     &lt;input type='text'  name='student_name'&gt;
     &lt;input type='text'  name='semester'&gt;
  </code></pre>
  
  <p>PHP,Mysql part:</p>
  
  <pre><code>&lt;?php
  session_start();
     $hostad=$_POST['hosteladmissionno'];
     $sem=$_POST['student_name'];
     $sem=$_POST['semester'];
  $r1="INSERT INTO payment(hosteladmissionno)VALUES ('$hostad')";
  </code></pre>
  
  <p>Now i want the fields <strong>student_name</strong> and <strong>semester</strong> to be autofilled for the correspoinding <strong>hosteladmissionno</strong>. Can this be done by Ajax or Jquery? If so.. How can i implement in this Code?
  Note: hosteladmissionno,student_name and semester belongs to registration tablem in my database. I need to retrieve the values from that table.Thanks in advance. </p>