<?php
//  error_reporting(E_ERROR | E_PARSE);
 error_reporting(0);
//  mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
include('/config.php');
?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>     
<body>
<!--===== dependent dropdown form============-->
<div class="dependent-dropdown">
<form autocomplete="off" action=" "  method = "">
  <div class="input-field">
 <?php  $test=mysqli_fetch_all(mysqli_query($con,"SELECT * from master_process "));
        echo $test;
        ?>
  </div>
 <br><br>
  <div class="input-field">
    <select id="category">
     <option value="">Category</option>
   </select>
  </div>
  <div class="input-field">
    <select id="stage">
     <option value="">Stage </option>
   </select>
  </div>
  </form>
</div>

<script>
$(document).ready(function() {
$('#project').on('change', function() {
var project = this.value;
$.ajax({
url: "action.php",
type: "GET",
data: {
project: PROJECT
},
cache: false,
success: function(result){
$("#category").html(result);
$('#stage').html('<option value="">Select category</option>'); 
}
});
});    
$('#category').on('change', function() {
var state_id = this.value;
$.ajax({
url: "action.php",
type: "GET",
data: {
state_id: state_id
},
cache: false,
success: function(result){
$("#stage").html(result);
}
});
});
});
</script>
<!--===== dependent dropdown form============-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="ajax-script.js" type="text/javascript"></script>
</body>
</html>