title: php live select onchange
body: <p><strong>Can someone help me. sorry i'm new in PHP and jquery. i was thinking if the user change the select tag. the details from the database will be print on the textbox without refreshing the page using ajax. i don't have ajax code right now. because i don't know what im going to do.</strong></p>
  
  <pre><code>                &lt;div class="row"&gt;
                      &lt;div class="col-md-6 col-sm-12 col-xs-12"&gt;
                          &lt;p&gt;Full Name&lt;/p&gt;
                          &lt;select class="form-control" name="FullName" id="FullName" onchange=""&gt;
                              &lt;option value="undefine"&gt;Select&lt;/option&gt;
                              &lt;?php
                                  $query = mysql_query('SELECT tbluserdetail.FirstName,
                                                              tbluserdetail.MiddleName,
                                                              tbluserdetail.LastName,
                                                              tblchurchs.ChurchName,
                                                              tblchurchs.Address,
                                                              useraccounts.AccountID,
                                                              useraccounts.AccountNo
                                                              FROM useraccounts
                                                              INNER JOIN tbluserdetail
                                                              ON tbluserdetail.UserID = useraccounts.UserID
                                                              INNER JOIN tblchurchs
                                                              ON tblchurchs.AChurchID = tbluserdetail.AChurchID
                                                      ');
                                  while($get_info = mysql_fetch_array($query)){
                                      $FName = specialchar($get_info['FirstName']);
                                      $MName = specialchar($get_info['MiddleName']);
                                      $LName = specialchar($get_info['LastName']);
                                      $CName = specialchar($get_info['ChurchName']);
                                      $CAdd = specialchar($get_info['Address']);
                                      $AN = specialchar($get_info['AccountNo']);
                                      $AI = specialchar($get_info['AccountID']);
  
                                      echo '&lt;option value="'.$AI.'"&gt;'.$FName." ".$MName." ".$LName." (".$CName."-".$CAdd.")".'&lt;/option&gt;';
                                  }
  
                              ?&gt;
                          &lt;/select&gt;
                      &lt;/div&gt;
  
                      &lt;div class="col-md-6 col-sm-12 col-xs-12 "&gt;
                          &lt;p&gt;Account No&lt;/p&gt;
                          &lt;input type="text" class="form-control" name="AccountNo" value=""Placeholder="000000" readonly&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="row"&gt;
                      &lt;div class="col-md-6 col-sm-12 col-xs-12 "&gt;
                          &lt;p&gt;Address&lt;/p&gt;
                          &lt;input type="text" class="form-control" name="Address" readonly&gt;
                      &lt;/div&gt;
                      &lt;div class="col-md-6 col-sm-12 col-xs-12 "&gt;
                          &lt;p&gt;Contact No&lt;/p&gt;
                          &lt;input type="text" class="form-control" name="ContactNo" readonly&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="row"&gt;
                      &lt;div class="col-md-6 col-sm-12 col-xs-12 "&gt;
                          &lt;p&gt;Gender&lt;/p&gt;
                          &lt;input type="text" class="form-control" name="Gender" readonly&gt;
                      &lt;/div&gt;
                      &lt;div class="col-md-6 col-sm-12 col-xs-12 "&gt;
                          &lt;p&gt;Age&lt;/p&gt;
                          &lt;input type="text" class="form-control" name="Age" readonly&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  </code></pre>