SHARE
TWEET

Untitled

a guest Oct 13th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. include 'koneksi.php';
  3.  ?>
  4. <html>
  5. <head>
  6.     <title>Membuat CRUD Dengan PHP Dan MySQL - Menampilkan data dari database</title>
  7.     <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
  8. </head>
  9. <body>
  10.     <div class="judul bg-dark text-light p-3 mt-3 mb-3">       
  11.         <h1>Membuat CRUD Dengan PHP Dan MySQL</h1>
  12.     </div>
  13.  
  14.     <a href="./input.php" class="btn btn-outline-primary">tambah data</a>
  15.  
  16.     <h3>Data user</h3>
  17.     <table border="1" class="table table-striped table-dark">
  18.         <tr>
  19.             <th>Id</th>
  20.             <th>Nama</th>
  21.             <th>Username</th>
  22.             <th>Password</th>
  23.             <th>Email</th> 
  24.             <th>Opsi</th>      
  25.         </tr>
  26.         <?php
  27.         $query_mysql = mysqli_query($koneksi, "SELECT * FROM data");
  28.         $nomor = 1;
  29.         while($data = mysqli_fetch_array($query_mysql)){
  30.         ?>
  31.         <tr>
  32.             <td><?php echo $nomor++; ?></td>
  33.             <td><?php echo $data['Nama']; ?></td>
  34.             <td><?php echo $data['Username']; ?></td>
  35.             <td><?php echo $data['Password']; ?></td>
  36.             <td><?php echo $data['Email']; ?></td>
  37.             <td>
  38.                 <a class="btn btn-outline-success text-light" href="edit.php?id=<?php echo $data['Id']; ?>">Edit</a> |
  39.                 <a class="btn btn-outline-danger text-light" href="hapus.php?id=<?php echo $data['Id']; ?>">Hapus</a>                  
  40.             </td>
  41.         </tr>
  42.         <?php } ?>
  43.     </table>
  44.     <script type="text/javascript" src="bootstrap.min.js"></script>
  45. </body>
  46. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top