Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php //koneksi cukup iki ae
- $host = "localhost";
- $user = "root";
- $pass = "";
- $db = "s_tani";
- $conn = mysqli_connect($host, $user, $pass, $db);
- if(mysqli_connect_errno()){
- echo "Database Not Connected".mysqli_connect_error();
- };
- ?>
- <section class="content-header">
- <h1 align="center">
- Penilaian Keterampilan Bertani
- </h1>
- </section>
- <!-- Main content -->
- <section class="content" >
- <div class="row">
- <div class="col-xs-6">
- <div class="box">
- <div class="box-body ">
- <form class="form-horizontal" action="hitung_nilai.php" method="POST" >
- <table id="example1" class="table table-bordered table-striped" border="0">
- <tr>
- <td>Nama Petani</td>
- <td>:</td>
- <td><select name="tani" style="width:146px">
- <option align="center"> -- Pilih Kode Petani --</option>
- <?php
- $sql = mysqli_query($conn, "SELECT * FROM tb_tani");
- while($row = mysqli_fetch_array($sql)){
- ?>
- <option value="<?php echo$row['nama']; ?>"><?php echo $row['kode'];?></option>
- <?php } ?>
- </select></td>
- </tr>
- <tr>
- <td>Pembibitana</td>
- <td>:</td>
- <td><select name="pembi" style="width:146px">
- <option align="center">   -- Pilih Penilaian --</option>
- <?php
- $sql = mysqli_query($conn, "select * from tb_matrix_subkriteria where id_matrik between '1' and '3'");
- while($row = mysqli_fetch_array($sql)){
- ?>
- <option value="<?php echo$row['Prioritas']; ?>"><?php echo $row['nama_kriteria'];?></option>
- <?php } ?>
- </select></td>
- </tr>
- <tr>
- <td>Penanamana</td>
- <td>:</td>
- <td><select name="pena" style="width:146px">
- <option align="center">   -- Pilih Penilaian --</option>
- <?php
- $sql = mysqli_query($conn, "select * from tb_matrix_subkriteria where id_matrik between '4' and '6'");
- while($row = mysqli_fetch_array($sql)){
- ?>
- <option value="<?php echo $row['Prioritas']; ?>"><?php echo $row['nama_kriteria'];?></option>
- <?php } ?>
- </select></td>
- </tr>
- <tr>
- <td>Pengobatan</td>
- <td>:</td>
- <td><select name="pengo" style="width:146px">
- <option align="center">   -- Pilih Penilaian --</option>
- <?php
- $sql = mysqli_query($conn, "select * from tb_matrix_subkriteria where id_matrik between '7' and '9'");
- while($row = mysqli_fetch_array($sql)){
- ?>
- <option value="<?php echo $row['Prioritas']; ?>"><?php echo $row['nama_kriteria'];?></option>
- <?php } ?>
- </select></td>
- </tr>
- <tr>
- <td>Pemeliharaan</td>
- <td>:</td>
- <td><select name="peme" style="width:146px">
- <option align="center">   -- Pilih Penilaian --</option>
- <?php
- $sql = mysqli_query($conn, "select * from tb_matrix_subkriteria where id_matrik between '10' and '12'");
- while($row = mysqli_fetch_array($sql)){
- ?>
- <option value="<?php echo $row['Prioritas']; ?>"><?php echo $row['nama_kriteria'];?></option>
- <?php } ?>
- </select></td>
- </tr>
- <tr>
- <td>Panen</td>
- <td>:</td>
- <td><select name="panen" style="width:146px">
- <option align="center">   -- Pilih Penilaian --</option>
- <?php
- $sql = mysqli_query($conn, "select * from tb_matrix_subkriteria where id_matrik between '13' and '15'");
- while($row = mysqli_fetch_array($sql)){
- ?>
- <option value="<?php echo $row['Prioritas']; ?>"><?php echo $row['nama_kriteria'];?></option>
- <?php } ?>
- </select></td>
- </tr>
- <tr>
- <td> </td>
- <td> </td>
- <td>
- <!-- <input type="submit" name="simpan" id="button" value="Proses" /> -->
- <input type="submit" value="Proses" name="simpan" class="btn btn-primary" style="width:70px;"></td>
- </tr>
- </table>
- </form>
- </div>
- <!-- /.box-body -->
- </div>
- <!-- /.box -->
- </div>
- </div>
- </section>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement