Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "koneksi.php";
- ?>
- <html>
- <head>
- <title>Tutorial Menampilkan Data Dari Database - Regina Adiba's Blog</title>
- </head>
- <body>
- <h2>Daftar User</h2>
- <table border="1">
- <tr>
- <th>No.</th>
- <th>Nama Lengkap</th>
- <th>Username</th>
- </tr>
- <?php
- $sql_tampil=mysql_query("SELECT * FROM user");
- $no=1;
- while ($row_tampil=mysql_fetch_assoc($sql_tampil)){
- echo "<tr>";
- echo "<td>$no</td>";
- echo "<td>$row_tampil[namalengkap]</td>";
- echo "<td>$row_tampil[username]</td>";
- echo "</tr>";
- $no++;
- }
- ?>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement