php - JQWidgets Combobox Typed value not being echoed or submitted to database -


below codes using, when selected values database, submitted database, if type not in database , want submitted, not submitted or echoed php. sombody please me.

thank you.

 <?php //jason file       #include connect.php file       include('db_connect2.php');      //get county of selected district      $query = "select * primary_schools ";        $result = mysql_query($query) or die("sql error 1: " . mysql_error());       while ($row = mysql_fetch_array($result, mysql_assoc)) {           $customers[] = array(               'emis_no' => $row['emis_no'],               'district' => $row['district'],               'county' => $row['county'],               'subcounty' => $row['subcounty'],               'parish' => $row['parish'],               'school' => $row['school']                );       }        echo json_encode($customers);     ?>  //script <script type=”text/javascript”> $(document).ready(function () {         //start emis code             var customerssourcel =         {             datatype: "json",             datafields: [                 { name: 'emis_no'},                 { name: 'district'},                 { name: 'county'},                 { name: 'subcounty'},                 { name: 'parish'},                 { name: 'school'}             ],             url: 'includes/emis.php',             cache: false,             async: false         };          var customersadapterl = new $.jqx.dataadapter(customerssourcel);          $("#emis_no").jqxcombobox(         {             source: customersadapterl,              width: 200,             height: 25,             prompttext: "emis",             displaymember: 'emis_no',             valuemember: 'emis_no'         });          $("#emis_no").bind('select', function(event)          {             if (event.args)             {                 var index = $("#emis_no").jqxcombobox('selectedindex');                      if (index != -1)                 {                     var record = customersadapterl.records[index];                     document.form1.district.value = record.district;                     $("#county").jqxcombobox({ disabled: false});                     document.form1.county.value = record.county;                     $("#sub_county").jqxcombobox({ disabled: false});                     document.form1.sub_county.value = record.subcounty;                     $("#parish").jqxcombobox({ disabled: false});                     document.form1.parish.value = record.parish;                     $("#school").jqxcombobox({ disabled: false});                     document.form1.school.value = record.school;                 }             }         });   

initialize $customers array $customers = array(); in begining of php file before start pushing values $customers[] = ...


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -