<?php
// Include the database connection file
include('db_config.php');

if (isset($_POST['dpeId']) && !empty($_POST['dpeId'])) {

	// Fetch state name base on country id
	$query = "SELECT * FROM tbl_dce WHERE dpeID = ".$_POST['dpeId'];
	$result = $con->query($query);

	if ($result->num_rows > 0) {
		echo '<option value="">Selectionné votre DCE</option>'; 
		while ($row = $result->fetch_assoc()) {
			echo '<option>'.$row['dcenom'].'</option>'; 
		}
	} else {
		echo '<option value="">dce not available</option>'; 
	}
} 
?>