set_charset('charset'); if ($conn->connect_error) { die("Gagal konek db: " . $conn->connect_error); } $sql = sprintf("SELECT idd, nama_depan, nama_belakang, alamat_tinggal FROM tentang"); $result = $conn->query($sql); if ($result->num_rows > 0) { echo "
ID
Nama Depan
Nama Belakang
Alamat
"; while($row = $result->fetch_assoc()) { echo "
".$row["idd"]."
".$row["nama_depan"]."
".$row["nama_belakang"]."
".$row["alamat_tinggal"]."
"; } echo "
"; } else { echo "0 results"; } $conn->close(); ?>