edit.php 1.72 KB
Newer Older
1 2 3 4 5 6
<?php
    require 'koneksi.php';
    include 'common/header.php';
?>

<h3><span class="glyphicon glyphicon-edit"></span>  Edit Menu</h3>
Roy Junedi Simamora committed
7
<a class="btn" href="admin_menu.php"><span class="glyphicon glyphicon-chevron-left"></span>  Kembali</a>
Roy Junedi Simamora committed
8 9 10 11

					
<form action="edit_proses.php" method="post" enctype="multipart/form-data">
		<table class="table">
12
<?php
13 14
$id = mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_GET['id']);
$det = mysqli_query($GLOBALS["___mysqli_ston"], "select * from menu where id_menu ='$id'")or die(mysqli_error($GLOBALS["___mysqli_ston"]));
Roy Junedi Simamora committed
15
$d=mysqli_fetch_array($det);
Roy Junedi Simamora committed
16
?>
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
			<tr>
				<td></td>
				<td><input type="hidden" name="id" value="<?php echo $d['id_menu'] ?>"></td>
			</tr>
                        <tr>
                            <td> Gambar </td>
                            <td>
                                <input type="file" name="gambar" class="form-control">
                            </td>
                        </tr>
			<tr>
				<td>Nama</td>
				<td><input type="text" class="form-control" name="nama" value="<?php echo $d['nama'] ?>"></td>
			</tr>
			<tr>
				<td>Harga</td>
				<td><input type="text" class="form-control" name="harga" value="<?php echo $d['harga'] ?>"></td>
			</tr>
                        <tr>
                            <td> Kategori </td>
                            <td> 
                                <input type="radio" name="kategori" value="1"> Makanan <br/>
39
                                <input type="radio" name="kategori" value="2"> Minuman
40 41 42 43 44 45
                            </td>
                        </tr>
			<tr>
				<td></td>
				<td><input type="submit" class="btn btn-info" value="Simpan"></td>
			</tr>
Roy Junedi Simamora committed
46 47
		</table>
	</form>
48 49 50 51

<?php
    include 'common/footer.php';
?>