Advertisement
Guest User

asd1

a guest
Dec 20th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.38 KB | None | 0 0
  1. <?php //koneksi cukup iki ae
  2.  
  3. $host = "localhost";
  4. $user = "root";
  5. $pass = "";
  6. $db = "s_tani";
  7. $conn = mysqli_connect($host, $user, $pass, $db);
  8.  
  9. if(mysqli_connect_errno()){
  10. echo "Database Not Connected".mysqli_connect_error();
  11. };
  12. ?>
  13. <section class="content-header">
  14. <h1 align="center">
  15. Penilaian Keterampilan Bertani
  16. </h1>
  17. </section>
  18. <!-- Main content -->
  19. <section class="content" >
  20. <div class="row">
  21. <div class="col-xs-6">
  22. <div class="box">
  23. <div class="box-body ">
  24. <form class="form-horizontal" action="hitung_nilai.php" method="POST" >
  25. <table id="example1" class="table table-bordered table-striped" border="0">
  26. <tr>
  27. <td>Nama Petani</td>
  28. <td>:</td>
  29. <td><select name="tani" style="width:146px">
  30. <option align="center">&#160-- Pilih Kode Petani --</option>
  31. <?php
  32. $sql = mysqli_query($conn, "SELECT * FROM tb_tani");
  33. while($row = mysqli_fetch_array($sql)){
  34. ?>
  35. <option value="<?php echo$row['nama']; ?>"><?php echo $row['kode'];?></option>
  36. <?php } ?>
  37. </select></td>
  38. </tr>
  39.  
  40. <tr>
  41. <td>Pembibitana</td>
  42. <td>:</td>
  43. <td><select name="pembi" style="width:146px">
  44. <option align="center">&#160&#160&#160-- Pilih Penilaian --</option>
  45. <?php
  46. $sql = mysqli_query($conn, "select * from tb_matrix_subkriteria where id_matrik between '1' and '3'");
  47. while($row = mysqli_fetch_array($sql)){
  48. ?>
  49. <option value="<?php echo$row['Prioritas']; ?>"><?php echo $row['nama_kriteria'];?></option>
  50. <?php } ?>
  51. </select></td>
  52. </tr>
  53.  
  54. <tr>
  55. <td>Penanamana</td>
  56. <td>:</td>
  57. <td><select name="pena" style="width:146px">
  58. <option align="center">&#160&#160&#160-- Pilih Penilaian --</option>
  59. <?php
  60. $sql = mysqli_query($conn, "select * from tb_matrix_subkriteria where id_matrik between '4' and '6'");
  61. while($row = mysqli_fetch_array($sql)){
  62. ?>
  63. <option value="<?php echo $row['Prioritas']; ?>"><?php echo $row['nama_kriteria'];?></option>
  64. <?php } ?>
  65. </select></td>
  66. </tr>
  67.  
  68. <tr>
  69. <td>Pengobatan</td>
  70. <td>:</td>
  71. <td><select name="pengo" style="width:146px">
  72. <option align="center">&#160&#160&#160-- Pilih Penilaian --</option>
  73. <?php
  74. $sql = mysqli_query($conn, "select * from tb_matrix_subkriteria where id_matrik between '7' and '9'");
  75. while($row = mysqli_fetch_array($sql)){
  76. ?>
  77. <option value="<?php echo $row['Prioritas']; ?>"><?php echo $row['nama_kriteria'];?></option>
  78. <?php } ?>
  79. </select></td>
  80. </tr>
  81.  
  82. <tr>
  83. <td>Pemeliharaan</td>
  84. <td>:</td>
  85. <td><select name="peme" style="width:146px">
  86. <option align="center">&#160&#160&#160-- Pilih Penilaian --</option>
  87. <?php
  88. $sql = mysqli_query($conn, "select * from tb_matrix_subkriteria where id_matrik between '10' and '12'");
  89. while($row = mysqli_fetch_array($sql)){
  90. ?>
  91. <option value="<?php echo $row['Prioritas']; ?>"><?php echo $row['nama_kriteria'];?></option>
  92. <?php } ?>
  93. </select></td>
  94. </tr>
  95.  
  96. <tr>
  97. <td>Panen</td>
  98. <td>:</td>
  99. <td><select name="panen" style="width:146px">
  100. <option align="center">&#160&#160&#160-- Pilih Penilaian --</option>
  101. <?php
  102. $sql = mysqli_query($conn, "select * from tb_matrix_subkriteria where id_matrik between '13' and '15'");
  103. while($row = mysqli_fetch_array($sql)){
  104. ?>
  105. <option value="<?php echo $row['Prioritas']; ?>"><?php echo $row['nama_kriteria'];?></option>
  106. <?php } ?>
  107. </select></td>
  108. </tr>
  109.  
  110. <tr>
  111. <td>&nbsp;</td>
  112. <td>&nbsp;</td>
  113. <td>
  114. <!-- <input type="submit" name="simpan" id="button" value="Proses" /> -->
  115. <input type="submit" value="Proses" name="simpan" class="btn btn-primary" style="width:70px;"></td>
  116. </tr>
  117. </table>
  118. </form>
  119. </div>
  120. <!-- /.box-body -->
  121. </div>
  122. <!-- /.box -->
  123. </div>
  124. </div>
  125. </section>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement