Codice PHP:
$result $mysqli->query("SELECT distinct(nome) FROM tabella where codice='".$_POST['codice']."'");