<?php
	$conn = new mysqli('localhost', 'root', '', 'dbvalidationinscription') or die(mysqli_error());
	$animal = $conn->prepare("SELECT * FROM `firiere` WHERE `faculte` = '$_REQUEST[faculte]'") or die(mysqli_error());
		echo '<option value = "">Select an animal</option>';
	if($animal->execute()){
		$a_result = $animal->get_result();
	}
		while($f_animal = $a_result->fetch_array()){
			echo '<option value = "'.$f_animal['departement'].'">'.$f_animal['departement'].'</option>';
		}
?>