php jquery ajax返回值

I need to get value from jquery/ajax .php file. I use it to display value based on dropdown menu. Problem is in my main php file I need to use this value to save it in the db but it won't work.

This is my ajax file:

$ID = $_GET['ID'];
$values = array();
$result_list[] = $row;

$sql="SELECT * FROM preference WHERE `Surname_Name` = '".$ID."'";
$result = $mysqli->query($sql);

                while($row = $result->fetch_array()) {
                $result_list[] = $row;
                }
                foreach ($result_list as $key => $value) {
                    $values = $value;
                }
$data = $values["TWW"];   
echo json_encode ($data);

This is my drop down:

    <div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="Surname_Name">Agent <span class="required">*</span></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<select name="Surname_Name" onchange="showUser(this.value)" id="Surname_Name" required class="form-control">
<option disabled selected hidden></option>
<?php
$tww_dd_sql = "SELECT * FROM `preference` WHERE Status = 'Active'";
$tww_dd_result = $mysqli->query($tww_dd_sql);
while($row = $tww_dd_result->fetch_array())
{
$row['id'];
echo "<option value='".$row['Surname_Name']."'>".$row['Surname_Name']."</option>";
}
?>
</select> 
</div>
</div>

    <!---------------------------------------------------------------------------------------------------------------------------------------------->                     
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="TWW">TWWID <span class="required">*</span>
</label>
<div id="txtHint" class="col-md-6 col-sm-6 col-xs-12">
<input disabled type="TWW" id="txtHint" name="TWW" required="required" class="form-control col-md-7 col-xs-12">
</div>
</div>

So when I select dropdown 'Agent' it needs to populate 'TWWID' based on selection and it retrieve data from ajax.

Here is my jquery script:

    <script>
    function showUser(str) {
        if (str == "") {
            document.getElementById("txtHint").innerHTML = "";
            return;
        } else { 
            if (window.XMLHttpRequest) {
                // code for IE7+, Firefox, Chrome, Opera, Safari
                xmlhttp = new XMLHttpRequest();
            } else {
                // code for IE6, IE5
                xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            xmlhttp.onreadystatechange = function() {
                if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                    document.getElementById("txtHint").innerHTML = xmlhttp.responseText;
                }
            }
// getuser.php is seprate php file. q is parameter 
            xmlhttp.open("GET","ajax/get-data_coaching.php?ID="+str,true);
            xmlhttp.send();
        }
    }
    </script>

I need to use 'TWWID' data to save into database:

When I use '".$_POST['TWW']."' in MySQL query it will save 0 but on the page it display data.