-
Notifications
You must be signed in to change notification settings - Fork 0
/
tambah.php
34 lines (27 loc) · 828 Bytes
/
tambah.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
include('config.php');
include('fungsi.php');
// mendapatkan data edit
if(isset($_GET['jenis'])) {
$jenis = $_GET['jenis'];
}
if (isset($_POST['tambah'])) {
$jenis = $_POST['jenis'];
$nama = $_POST['nama'];
tambahData($jenis,$nama);
header('Location: '.$jenis.'.php');
}
include('navbar.php');
?>
<section class="content container mt-5 justify-content-center text-center">
<h2>Tambah <?php echo $jenis?></h2>
<form class="ui form" method="post" action="tambah.php">
<div class="inline field">
<label>Nama <?php echo $jenis ?> : </label>
<input type="text" name="nama" placeholder="<?php echo $jenis?> baru">
<input type="hidden" name="jenis" value="<?php echo $jenis?>">
</div>
<br>
<input class="ui green button" type="submit" name="tambah" value="SIMPAN">
</form>
</section>