<!DOCTYPE html>
<html>
 <head>
     <meta charset="UTF-8" />
     <meta name="author" content="Manuele" />
    <title> Connexion BdD</title>
    <link rel="stylesheet" href="css/tableaux.css" />
 </head>
<body>
<h1>Liste de clients </h1>

<?php
    
/* on etablit la connexion */
    
require "connexion.php" ;    
    require 
"afficher.php";
    
    
$mysqli connexion();
    
    
$sql "SELECT id, nom, email, adresse FROM client ORDER BY nom " ;
    
    
$result $mysqli->query ($sql) ;
    
    if ( ! 
$result ) { echo "<p> Desolée, requête impossible ! </p>" ; }
    else {
        
        echo 
"<p> Nous avons " $result->num_rows " clients. </p>"
        
        echo 
"<p> Il y a " 
             
$result->field_count " attributs par client. </p> " ;

        
        
afficherResultats($result);                
                    
        
$mysqli->close();
    }
?>