Advertisement
ridyko

Untitled

Feb 1st, 2022
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.98 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_qk1.css">
  6. <title>Simpan Data Mahasiswa Quest Komputer</title>
  7. </head>
  8. <body>
  9. <section>
  10.  <h1>Quest Komputer</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.  <div>
  19.  <?php
  20.  $nim=$_POST['nimmhs'];
  21.  $nama=$_POST['namamhs'];
  22.  $alamat=$_POST['alamatmhs'];
  23.  $telepon=$_POST['teleponmhs'];
  24.  $jurusan=$_POST['jurusanmhs'];
  25.  
  26.  $koneksi=mysqli_connect("localhost","root","","dbkampus");
  27.  $proses="INSERT INTO tbl_mahasiswa(nimmhs,namamhs,alamatmhs,teleponmhs,jurusanmhs)
  28. VALUES('$nim','$nama','$alamat','$telepon','$jurusan')";
  29.  $hasil=mysqli_query($koneksi,$proses);
  30.  echo "<font color=red size=5>Data Mahasiswa Berhasil Diisi</font>";
  31.  
  32.  ?>
  33. <br>
  34. <a href="tampil.php"><h3>Lihat Data Mahasiswa</h3></a>
  35. </div>
  36. </section>
  37. <footer>design by Quest Komputer</footer>
  38. </body>
  39. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement