include("./inc/lib.php"); if ($_POST['btnom']) { $where = "and (user.nom LIKE '".$_POST['nom']."%') order by user.nom"; } elseif ($_POST['btpromo']) { $info = explode('-', $_POST['promotion']); $where = "and (contacts.desContact = '".$info[0]."')"; if ($info[1] != '') { $where.=" and (contacts.anneesortieContact = '".$info[1]."')"; } $where.= " order by user.nom"; } elseif ($_POST['btdep']) { $where = "and (contacts.categContact = '".$_POST['departement']."') order by user.nom"; } $sql2 = "select PKuser, nom, prenom, PKcontact, desContact, categContact, melContact, adrContact, CPContact, villeContact, paysContact, anneesortieContact from user, contacts where (user.PKuser = contacts.FKuser) AND (user.annuAffich = 'O')".$where; $db2 = new class_db($sql2); ?>