-
Notifications
You must be signed in to change notification settings - Fork 0
/
coba.php
44 lines (33 loc) · 1.08 KB
/
coba.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
<?php
include("koneksi.php");
?>
<html>
<head>
<link rel="stylesheet" href="css/bootstrap.css">
<script>
</script>
</head>
<body>
<div class="col-sm-4">
<form action="coba.php" method="post" name="add">
<div class="form-group">
<label for="comment">Comment</label>
<input type="text" class="form-control" id="comment" name="Comment">
</div>
<input type="submit" name="Submit" class="btn" value="send">
</form>
</div>
<?php
// Check If form submitted, insert form data into users table.
if(isset($_POST['Submit'])) {
$comment = $_POST['Comment'];
// include database connection file
//include("koneksi.php");
// Insert user data into table
$result = mysqli_query($mysqli, "INSERT INTO victim (comment) VALUES('$comment')");
// Show message when user added
echo "Sent";
}
?>
</body>
</html>