-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
66 lines (57 loc) · 1.53 KB
/
index.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<html>
<head>
<!--
Project Name : CRUD with PHP, MySQL and Bootstrap
Author : Hendra Setiawan
Website : http://www.hendrasetiawan.net
Email : hendrabpp[at]gmail.com
-->
<?php
include "module/header.php";
include "module/alerts.php";
include "config/connect.php";
?>
</head>
<body>
<div class="container">
<?php include "module/nav.php"; ?>
<div class="row">
<div class="col-lg-12">
<div class="page-header">
<h1>Form Input (Create)</h1>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<form id="form_input" method="POST">
<?php
if(isset($_POST['simpan']))
{
mysql_query("INSERT INTO t_member (nama, email, hp) VALUES ('".$_POST['nama']."','".$_POST['email']."','".$_POST['hp']."')");
writeMsg('save.sukses');
}
?>
<div class="form-group">
<label class="control-label" for="nama">Nama (wajib diisi)</label>
<input type="text" class="form-control" name="nama" id="nama" required>
</div>
<div class="form-group">
<label class="control-label" for="email">Email (wajib diisi)</label>
<input type="email" class="form-control" name="email" id="email" required>
</div>
<div class="form-group">
<label class="control-label" for="hp">No HP</label>
<input type="text" class="form-control" name="hp" id="hp">
</div>
<div class="form-group">
<input type="submit" value="Simpan" name="simpan" class="btn btn-primary">
<input type="reset" value="Reset" class="btn btn-danger">
</div>
</form>
</div>
</div>
</div>
<?php include "module/footer.php"; ?>
</body>
</html>