<?php 
$sqlBillType = "select * from billtype_info where bill_type_name = '$bill_name'";
$runBillType = mysqli_query($link, $sqlBillType);
if($runBillType === FALSE){
    die(mysqli_error($link));
}
$resultBillType = mysqli_fetch_assoc($runBillType);
$bill_code = $resultBillType["bill_code"];
$bill_type_id = $resultBillType["bill_type_id"];
$bill_type_name = $resultBillType["bill_type_name"];

?>