CRUD

 index crud

<?php
include "koneksi.php";
$mhs = mhs("SELECT * FROM user");
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <table border ="1">
    <tr>
    <th>No</th>
    <th>Aksi</th>
    <th>Nama</th>
    <th>Kelas</th>
    </tr>

    <?php $i = 1?>
    <?php
    foreach ($mhs as $row):
    ?>
    <tr>
    <td><?= $i ; ?></td>
    <td>
    <a href="ubah.php?id<?= $row['id']; ?>">ubah</a>
    <a href="hapus.php?id<?= $row['id']; ?>" onclick="return confirm('Yakin ??')">hapus</a>
    </td>
    <td><?= $row['nama']; ?></td>
    <td><?= $row['kelas']; ?></td>
    </tr>
    <?php $i++ ?>
    <?php endforeach ?>
    </table>
</body>
</html>




https://drive.google.com/file/d/15Zd-v7EqhGf0PVcCSaM_r_MxPFn0UsJh/view?usp=sharing

Comments

Popular posts from this blog

Cara Membuat Aplikasi Java Netbeans dengan MYSQL Database