<!DOCTYPE html>
<html>
    <head>
        <title>MCH</title>
        <meta charset="utf-8">
        <link rel="stylesheet" href="mch.css">
    </head>
    <body>
        <?php
            $servername = 'mysql:host=94.23.252.168;dbname=ersendb';
            $username = 'root';
            $password = 'prose@111';
            $conn = new PDO($servername, $username, $password);
            if ($conn) {
                $req="select count(*) as nbr from ersen_centrale where typecentrale like 'MCH'";
                $res=$conn->query($req);
                if ($res) {

                    while ($ligne=$res->fetch()) {
                    ?>
                        <h1><?php echo $ligne['nbr'];?></h1>
                    <?php
                    }      
                    }else{
                        echo "requete echoué !";
                    }               
                }else{
                echo "Erreur de connexion !";
            }
        ?>
    </body>
</html>