Archives départementales en ligne
echo ("");
$query= "SELECT * FROM departement d, region r where NUMDEPT ='".substr($_GET['insee'],0,2)."' and r.numregion=d.numregion";
$result = mysqli_query($connect,$query);
if (@mysqli_num_rows($result)) {
if ($val = @mysqli_fetch_array($result)) {
$nomdep=utf8_encode($val["NOMDEPT"]);
Echo "".$nomdep.""; Echo "Numéro du département: ".$val["NUMDEPT"];
Echo " Archives numérisées en ligne$query= "SELECT * FROM reference.service where dep='".$val2["NUMDEPT"]."'"; $result2 = mysqli_query($connect,$query); if (@mysqli_num_rows($result2)) { echo " Autres services d'archives dans le département: "; while ($val2 = @mysqli_fetch_array($result2)) { echo utf8_encode($val2["nom"]).""; } } include "defintion.php"; include "annee.php"; ?> echo (" | ");
echo "Les patronymes:"; $query= "select nom as Nom from patronyme where dept='".substr($_GET['insee'],0,2)."' order by Nom"; $result = mysqli_query($connect,$query); if (@mysqli_num_rows($result)) { while ($val = @mysqli_fetch_array($result)) { echo ("".trim(utf8_encode($val["Nom"])).""); // fputs($fp,trim(utf8_encode($val["Nom"]))." "); } } echo (" | ");
Echo "Les prénoms:"; $query= "select prenom from prenom order by prenom"; $result = mysqli_query($connect,$query); if (@mysqli_num_rows($result)) { while ($val = @mysqli_fetch_array($result)) { echo ("".($val["prenom"]).""); } } echo (" | ");
//conexion sur la base fantoir
$host_name = 'db775610934.hosting-data.io';
$database = 'db775610934';
$user_name = 'dbo775610934';
$password = '14rdvM!!60';
$connect = mysqli_connect($host_name, $user_name, $password, $database);
if (mysqli_errno()) {
die(' La connexion au serveur MySQL a échoué: '.mysql_error().' '); } else { //echo 'Connexion au serveur MySQL établie avec succès. '; } Echo "Les rues et lieux dits:"; $query= "SELECT * FROM db775610934.fantoir where insee = '".$_GET['insee']."' order by rue"; $result = mysqli_query($connect,$query); if (@mysqli_num_rows($result)) { while ($val = @mysqli_fetch_array($result)) { echo $val["rue"].""; } } ?> echo (" |