<?php
require_once "config.php";
$sql = "SELECT * FROM db";
if($result = mysqli_query($link, $sql)){
if(mysqli_num_rows($result) > 0){
echo "<table class='table table-bordered'>";
echo "<thead>";
echo "<tr>";
echo "<th>#</th>";`enter code here`
echo "<th>Ansprechpartner</th>";
echo "<th>Firma</th>";
echo "<th>AddresseHausenummer</th>";
echo "<th>PLZ</th>";
echo "<th>Anschrift</th>";
echo "<th>Telefone</th>";
echo "<th>Email</th>";
echo "<th>Kartenanzahl</th>";
echo "<th>Aktuelleranbieter</th>";
echo "<th>Bemerkungsfel</th>";
echo "<th>Action</th>";
echo "</tr>";
echo "</thead>";
echo "<tbody>";
while($row = mysqli_fetch_array($result)){
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['Ansprechpartner'] . "</td>";
echo "<td>" . $row['Firma'] . "</td>";
echo "<td>" . $row['AdresseHausenummer'] . "</td>";
echo "<td>" . $row['PLZ'] . "</td>";
echo "<td>" . $row['Anschrift'] . "</td>";
echo "<td>" . $row['Telefon'] . "</td>";
echo "<td>" . $row['Email'] . "</td>";
echo "<td>" . $row['Kartenanzahl'] . "</td>";
echo "<td>" . $row['Aktuelleranbieter'] . "</td>";
echo "<td>" . $row['Bemerkungsfel'] . "</td>";
echo "<td>";
echo "<a href='read.php?id=". $row['id'] ."' title='Datensatz anzeigen' data-toggle='tooltip'><span class='glyphicon glyphicon-eye-open'></span></a>";
echo "<a href='update.php?id=". $row['id'] ."' title='Datensatz aktualisieren' data-toggle='tooltip'><span class='glyphicon glyphicon-pencil'></span></a>";
echo "<a href='delete.php?id=". $row['id'] ."' title='Aufzeichnung löschen' data-toggle='tooltip'><span class='glyphicon glyphicon-trash'></span></a>";
echo "</td>";
echo "</tr>";
}
echo "</tbody>";
echo "</table>";
// Free result set
mysqli_free_result($result);
} else{
echo "<p class='lead'><em>No records were found.</em></p>";
}
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
mysqli_close($link);
?>
</div>
</div>
</div>
</div>