Q:

PHP, Mysql, Bootstrap Table not working

I sit for several hours at a script, but I get it not work properly. I would like to have filled a bootstrap table with mysql data. Unfortunately, I always get other information or error messages out.
It would be very nice if someone could look at the script.
$conn = new mysqli($servername, $username, $password, $dbname);
$conn->set_charset("utf8");
$sql = "SELECT Osman, Tanja, Christiane, Marcella, Magarita, Nathalie, Kommentar, Gutschein, EC FROM Salon1_10_04_2016";
$results = $conn->query($sql);

 <table class="table table-hover">
  <thead>
  <tr>
    <th>Firstname</th>
    <th>Lastname</th>
    <th>Email</th>
  </tr>
</thead>
<tbody>
       <?while($row = mysqli_fetch_assoc($result)) {
            echo"<tr class='table_row'>";
            echo"<td>" . $row['Osman'] . "</td>";
            echo"<td>" . $row['Tanja'] . "</td>";
            echo"<td>" . $row['Christiane'] . "</td>";
            echo"<td>" . $row['Marcella'] . "</td>";
            echo"<td>" . $row['Magarita'] . "</td>";
            echo"<td>" . $row['Nathalie'] . "</td>";
            echo"<td>" . $row['Kommentar'] . "</td>";
            echo"<td>" . $row['Gutschein'] . "</td>";
            echo"<td>" . $row['EC'] . "</td>";
            echo"</tr>";
             } echo"</table>";}?>

A:

You are mixing object oriented style with procedural, try this one:
<?php
$conn = new mysqli($servername, $username, $password, $dbname);
$conn->set_charset("utf8");
$sql = "SELECT Osman, Tanja, Christiane, Marcella, Magarita, Nathalie, Kommentar, Gutschein, EC FROM Salon1_10_04_2016";
$results = $conn->query($sql);
?>
<table class = "table table-hover">
    <thead>
        <tr>
            <th>Firstname</th>
            <th>Lastname</th>
            <th>Email</th>
        </tr>
    </thead>
    <tbody>
        <?php
        while ($row = $results->fetch_assoc()) {
            echo"<tr class='table_row'>";
            echo"<td>" . $row['Osman'] . "</td>";
            echo"<td>" . $row['Tanja'] . "</td>";
            echo"<td>" . $row['Christiane'] . "</td>";
            echo"<td>" . $row['Marcella'] . "</td>";
            echo"<td>" . $row['Magarita'] . "</td>";
            echo"<td>" . $row['Nathalie'] . "</td>";
            echo"<td>" . $row['Kommentar'] . "</td>";
            echo"<td>" . $row['Gutschein'] . "</td>";
            echo"<td>" . $row['EC'] . "</td>";
            echo"</tr>";
        }
        ?>
    </tbody>
</table>

Anyway number of columns in table body is diffrent than defined in thead, make sure that your SQL is valid.
UPDATE: if you want to check is there value into a string, you can define simple function for that which returns desired char if value is empty:
<?php
function checkNull($str){
    if(!trim($str)) return '-';
    else return $str;
}

// how to use it:
echo"<td>" . checkNull($row['Osman']) . "</td>";
?>

