Advertisement
Guest User

Untitled

a guest
Feb 26th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. <?php
  2. require 'functions.php';
  3.  
  4. if (isset($_POST["submit"])) {
  5.  
  6. if (tambah($_POST) > 0 ) {
  7. echo "
  8. <script>
  9. alert('data berhasil ditambahkan!');
  10. document.location.href='index.php';
  11. </script>
  12. ";
  13. } else {
  14. echo "
  15. <script>
  16. alert('data gagal ditambahkan!');
  17. document.location.href='index.php';
  18. </script>
  19. ";
  20. }
  21.  
  22. }
  23. ?>
  24. <form action="" method="post">
  25. <ul>
  26. <li>
  27. <label for="id_petugas">ID Petugas :</label>
  28. <input type="text" name="id_petugas" id="id_petugas" required>
  29. </li>
  30. <li>
  31. <label for="username">Username :</label>
  32. <input type="text" name="username" id="username" required>
  33. </li>
  34. <li>
  35. <label for="password">Password :</label>
  36. <input type="text" name="password" id="password" required>
  37. </li>
  38. <li>
  39. <label for="nama_petugas">Nama Petugas :</label>
  40. <input type="text" name="nama_petugas" id="nama_petugas" required>
  41. </li>
  42. <li>
  43. <label for="id_level">ID Level</label>
  44. <input type="text" name="id_level" id="id_level" required>
  45. </li>
  46. <li>
  47. <button type="submit" name="submit">Tambah Data!</button>
  48. </li>
  49. </ul>
  50. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement