<?php
if(isset($_POST['eleve'])) {
	$eleve = mysqli_query($bdd,"SELECT * FROM ".$prefix."_eleves WHERE code != '' AND code = '".$_POST['eleve']."'");
	if(mysqli_num_rows($eleve)>0) {
		$eleve_info = mysqli_fetch_assoc($eleve);
		$eleve_id = $eleve_info['eleves_id'];
		$snom = $eleve_info['nom'];
		$sprenom = $eleve_info['prenom'];
		$eleve_div = $eleve_info['division'];
		$eleve_sex = $eleve_info['sexe'];
		$eleve_naissance = $eleve_info['naissance'];
		$_SESSION['eleves_id'] = $eleve_id;
	}
}
?>