Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function formtambahkerusakan(){
- $this->koneksi = new Akses;
- $this->koneksi->link;
- echo '<style>.a{
- margin-left:auto;
- margin-righ:auto;
- }
- .c{
- margin-top:0px;
- margin-left:0px;
- }
- fieldset{
- display : block;
- margin-left: auto;
- margin-right:auto;
- padding-top: 0.35em;
- padding-bottom: 0.625em;
- padding-left: 0.75em;
- padding-right: 0.75em;
- border: 2px groove (internal value);
- }</style>';
- // $data = mysqli_query($this->koneksi->link, "select kd_mesin from mesin order by kd_mesin DESC");
- // $fdata = mysqli_fetch_array($data);
- // $id = $fdata['kd_mesin'];
- // $nourut = substr($id, 4, 2);
- // $tambah = (int) $nourut + 1;
- // if (strlen($tambah) == 2) {
- // $format = "MSN" . "000" . $tambah;
- // } else {
- // $format = "MSN" . "00" . $tambah;
- // /*echo $format;*/
- // }
- echo "<form name=tkerusakan action=simpan_tambah_kerusakan.php method=post>
- <h1 align=center>Tambah Data Kerusakan</h1><br><br>
- <fieldset style='width:400px;'><legend style='font-size: 20px; margin-right:360px;'>Kerusakan</legend>
- <table class=a>
- <tr>
- <td>Kode Kerusakan</td>
- <td> <input type=text name=kd_kerusakan class='form-control' placeholder='Kode Kerusakan'></td>
- </tr>"
- <select name="kode_mesin" class="form-control">
- <option>-----Pilih----</option>
- <?php
- $query= mysqli_query($koneksi->conn, "SELECT*FROM kerusakan");
- while ($row = mysqli_fetch_array($query)){?>
- <option value="<?php echo $row['kd_mesin'];?>">
- <?php echo $row['kd_mesin'];?>
- </option>
- <?php
- }
- ?>
- </select>
- echo "<tr>
- <td>Keluhan</td>
- <td> <input type=text name=keluhan class='form-control' placeholder='Keluhan' maxlength=10 required></td>
- </tr>
- <tr>
- <tr>
- <td>Tindakan</td>
- <td> <input type=text name=tindakan class='form-control' placeholder='Tindakan' maxlength=10 required></td>
- </tr>
- <tr>
- <td>Kode Sparepart</td>
- <td> <input type=text name=kd_sparepart class='form-control' placeholder='Kode Sparepart' maxlength=10 required></td>
- </tr>
- <td align=center colspan=2><input class=b type=submit value=Simpan>
- <a href='lihat_kerusakan.php'><input class=c type=button value=Batal></a>
- </td>
- </tr>
- </table>
- </fieldset>
- </form"; "
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement