session_start();
if(!isset($_SESSION ['username'])){
header ('location: login.php');
}
?>
<html>
<head>
</head>
<body>
<?php
include "rep_con.php";
$username=$_SESSION['username'];
$query = "select * from dosen where username='$username'";
$result = mysqli_query($koneksi, $query);
echo "
<thead>
<th><h2>PENGUMUMAN .</th>
</thead>
";
if($result) //artinya jika query berhasil dijalankan
{
while($row = mysqli_fetch_assoc($result))
{
//print_r($row);
//echo $row['nama'];
echo "<tr>";
echo "<td>" . $row['id_dosen'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>" . $row['nidn'] . "</td>";
echo "<td>" . $row['nama_dosen'] . "</td>";
echo "<td>" . $row['username'] . "</td>";
echo "<td>" . $row['level'] . "</td>";
echo "</tr>";
}
}
echo "</table>";
?>
</body>
</html>