Advertisement
ridyko

Untitled

Feb 1st, 2022
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.05 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset=utf-8">
  5. <link rel="stylesheet" type="text/css" href="css_jnm1.css">
  6. <title>Input Data PHP | www.javanetmedia.com</title>
  7. </head>
  8. <body>
  9. <section>
  10.  <h1>Javanet Media</h1>
  11.  <nav>
  12.  <a href="tampil.php">Home</a>
  13.  <a href="input.php">Input</a>
  14.  <a href="tampil.php">Edit</a>
  15.  <a href="tampil.php">Hapus</a>
  16.  
  17.  </nav>
  18.  <h2>Data Mahasiswa</h2>
  19.  <article>Data Mahasiswa Javanet Media</article>
  20.  <div>
  21.  <table style="width:100%">
  22.  <tr>
  23.  <th>No</th>
  24.  <th>Kode</th>
  25.  <th>Nama</th>
  26.  <th>Alamat</th>
  27.  <th>Telepon</th>
  28.  <th>Jurusan</th>
  29.  </tr>
  30.  <?php
  31.  include 'koneksi_db.php';
  32.  $query = "SELECT * FROM tbl_mahasiswa ";
  33.  $exe = mysql_query($query);
  34.  $no = 1;
  35.  while($row = mysql_fetch_assoc($exe)){
  36.  $a = $row['nimmhs'];
  37.  $b = $row['namamhs'];
  38.  $c = $row['alamatmhs'];
  39.  $d = $row['teleponmhs'];
  40.  $e = $row['jurusanmhs'];
  41.  echo "<tr><td>$no</td><td>$a</td><td>$b</td><td>$c</td><td>$d</td><td>$e</td></tr>";
  42.  $no++;
  43.  }
  44.  ?>
  45.  </table>
  46. </div>
  47. </section>
  48. <footer>design by JNM</footer>
  49. </body>
  50. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement