<header>
<nav>
<a href="home.php">Home</a>
<?php if($_SESSION[SESSION_NAME]['role'] == "admin"): ?>
<a href="system.php">admin - menu</a>
<?php endif; ?>
<a href="chg_pass.php">Ganti Password</a>
<a href="logout.php">Logout</a>
</nav>
</header>
Tag Archives: html
snippet edition : php html table
<?php
if(!isset($tbl_header) || !isset($tbl_hasil))
{
?>
<p class="notice">tidak dapat menampilkan hasil query</p>
<?php
}
else
{
?>
<figure>
<table>
<thead>
<tr>
<?php foreach($tbl_header as $h): ?>
<th><?=$h?></th>
<?php endforeach;?>
</tr>
</thead>
<tbody>
<?php foreach($tbl_hasil as $row): ?>
<tr>
<?php foreach($tbl_header as $h): ?>
<td><?=$row[$h]?></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</figure>
<?php
}
?>