<?php require_once "session.php"; require_once "header.php"; require_once 'functions/range_function.php'; require_once "functions/test_battery_functions.php"; require_once "functions/category_function.php"; require_once "functions/test_functions.php"; $rangeFunction = new rangeFunction(); $testbatteryfunction = new testbatteryfunction(); $categoryfunction = new categoryfunction(); $testfunction = new testfunction(); ?> <div class="container"> <div class="container align_center align_height"> <span class="sports">RANGE</span> </div><!--end container--> <div class="container"> <div class="col-xs-12 col-md-11"> <div class="col-md-4 hidden-xs"></div> <div class="col-xs-12 col-md-7 align_margin"> <form name="range_form" id="range_form_id"> <div class="form-group"> <label for="sel1">Select Test Battery Names</label> <select class="form-control adjust_width classic" id="sel1" name="range_testbattery" data-validation-error-msg="Please Select the Name of Test Battery " data-validation="required"> <option value="">Select Test Battery Names</option> <?php $query = $testbatteryfunction->testbatterySelect(); while ($row = mysql_fetch_array($query)) { ?> <option value="<?php
} // To load district for selected state if (isset($_GET['loaddatafromdb'])) { $rangeFunction = new rangeFunction(); $rangeFunction->rangetestbatteryid = $_POST['testbattery_id']; $selectcategory_data = $rangeFunction->categoryselect(); $category_json = array(); while ($result = mysql_fetch_array($selectcategory_data)) { $tmp = array('categories_id' => $result['categories_id'], 'categories_name' => $result['categories_name']); array_push($category_json, $tmp); } $selecttest_data = $rangeFunction->testselect(); $test_json = array(); while ($result = mysql_fetch_array($selecttest_data)) { $tmp = array('test_id' => $result['test_id'], 'test_name' => $result['test_name']); array_push($test_json, $tmp); } echo json_encode($category_json) . '#####' . json_encode($test_json); } // To load parameter format and unit using testattribute id if (isset($_GET['paramformat'])) { $json = array(); $rangeFunction = new rangeFunction(); $rangeFunction->rangetestattributeid = $_POST['testattribute_id']; $select_data = $rangeFunction->parameterSelect(); while ($result = mysql_fetch_array($select_data)) { $tmp = array('test_parameter_type' => $result['test_parameter_type'], 'test_parameter_unit' => $result['test_parameter_unit'], 'test_parameter_format' => $result['test_parameter_format']); array_push($json, $tmp); } echo json_encode($json); }