Secretarissen en ledental van de koren t.b.v. BUMA

Buma opgave in Excel

{source} 

<?php
// Connect de database

$dbhost = ‘localhost:3306’;
$dbusername = ‘GertUphoff’;
$dbpasswd = ‘5o!Ov9h6’;
$database_name = ‘k42118_leden’;

 

$link = mysqli_connect($dbhost, $dbusername, $dbpasswd, $database_name);

 

/* check connection */
if (mysqli_connect_errno()) {
    printf(“Verbinding mislukt: %s\n”, mysqli_connect_error());
    exit();
}

mysqli_set_charset($link,”utf8″);

$query =”SELECT `koorplaats`,`volnaam`,`ledental`,`secretaris`,`s_email` FROM `leden`
WHERE 1
ORDER by `volnaam` ASC”;

$results = $link->query($query );

?>

 

</h2><p class=”signaal”></p>
<table class=”table table-striped”>
<tr><td><H4><b>Plaats</a></td><td><H4><b>Koornaam</td><td><H4><b>Ledental</td><td><H4><b>Naam Secretaris</td><td><H4><b>E-mail secretaris</td><td>

<?php

 

// Toon de gevonden gegevens
if ($results->num_rows > 0) {

    // output data of each row
    while($result = $results->fetch_assoc()) {
        echo”<tr><td>” . $result[“koorplaats”] . “</td><td>” . $result[“volnaam”] .”</td><td>” .$result[“ledental”] .”</td><td>” .$result[“secretaris”] .”</td><td>” .$result[“s_email”] .”</td></tr>”;
    }

}

?>

</table>

{/source}