jQuery Ajax值获取

I want to fetch value through jquery Ajax in PHP. but when I run below this code value is fetch properly but all value are joined together when fetching and together value print all field, but I want to print the separate value in the separate field. my code is below, please solve this problem

index.php

<!DOCTYPE html> 
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<select name="Pro" onChange="my_validate_func()" id="pro_serv">
<option value=""></option>
<option value="" ><font size="-1">Add New Product</font></option>
<option value="Development"><font size="-1">Development</font></option>
<option value="Maintance"><font size="-1">Maintance</font></option>
</select>
<br />
<input type="text" name="desc" id="desc" value="" />
<br />
<input type="text" name="unitprice" id="unitprice" value="" />
<br /><input type="text" name="discount" />
<script type="text/javascript" src="bootstrap/jquery1.8.3jquery.min.js">
</script>
<script>
$( document ).ready(function() {});
function my_validate_func() {
var pro_serv = $('#pro_serv').val();

    if ($('#pro_serv').val() != "" ) {
        $.ajax({
            type: "POST",
            url: 'check.php',
            data: { pro_serv: pro_serv},
            success: function(response) {
                $('#desc').val(response);
                $('#unitprice').val(response);
                $('#tax').val(response);

            }

        });
    }
    }
</script>
</body>
</html>

check.php

<?php
include('database/db.php');
$type=$_POST['pro_serv'];
$sql="Select * from product_service_details where type='$type'";
$result=mysql_query($sql);
if($dtset=mysql_fetch_array($result))
{
    $desc=$dtset['desc'];
    $unitprice=$dtset['unitprice'];
    $tax=$dtset['tax'];
        echo $desc;
        echo $unitprice;
        echo $tax;
}


?>

You can use a separates for separate values then use JS split function.

 echo $desc ."-" . $unitprice ."-" .$tax;

In Js

var arr = response.split('-');
$('#desc').val(arr[0]);
$('#unitprice').val(arr[1]);
$('#tax').val(arr[2]);

You need to use json_encode in php and in jquery you need to parse the response like below:

PHP:

<?php
include('database/db.php');
$type=$_POST['pro_serv'];
$sql="Select * from product_service_details where type='$type'";
$result=mysql_query($sql);
if($dtset=mysql_fetch_array($result))
{
    echo json_encode($dtset);
}

JQuery:

        $.ajax({
            type: "POST",
            url: 'check.php',
            data: { pro_serv: pro_serv},
            success: function(response) {
            var res = $.parseJSON(response);
                $('#desc').val(res.desc);
                $('#unitprice').val(res.unitprice );
                $('#tax').val(res.tax );

            }

        });

in check.php

*echo $tax;* should be echo json_encode('tax'=>$tax);

and in index.php

$('#tax').val(response); can be $('#tax').val(response.tax);