Ich sitze für mehrere Stunden in einem Skript, aber ich bekomme es nicht richtig funktionieren. Ich hätte gerne eine Bootstrap-Tabelle mit MySQL-Daten gefüllt. Leider bekomme ich immer andere Informationen oder Fehlermeldungen raus. Es wäre sehr schön, wenn sich jemand das Skript ansehen könnte.PHP, Mysql, Bootstrap Tabelle funktioniert nicht
$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>";}?>
Wenn ich tatsächlich eine var_dump von $ Ergebnissen i machen get: Objekt (mysqli_result) # 3 (5) {["current_field"] => int (0) ["field_count"] => int (9) ["Längen"] => NULL ["num_rows"] = > int (1) ["type"] => int (0)} –
Warum hast du das zweite PHP-Tag '' in der Mitte deines Skripts geöffnet? – mitkosoft
Zwischen diesen beiden gibt es HTML und CSS-Skripte. –