<?php
	$conn = new mysqli('localhost', 'root', '', 'db_animal') or die(mysqli_error());
	$animal = $conn->prepare("SELECT * FROM `animal` WHERE `animal_group` = '$_REQUEST[animal_group]'") 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['animal'].'">'.$f_animal['animal'].'</option>';
		}
?>