-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstore.php
More file actions
executable file
·86 lines (77 loc) · 2.11 KB
/
store.php
File metadata and controls
executable file
·86 lines (77 loc) · 2.11 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
session_start();
if (!isset($_SESSION["login"])) {
header("Location: login.php");
exit;
}
require_once 'controllers.php';
// cek apakah tombol submit sudah ditekan atau belum
if (isset($_POST["submit"])) {
// cek apakah data berhasil di tambahkan atau tidak
if (store($_POST) > 0) {
echo "
<script>
alert('data berhasil ditambahkan!');
document.location.href = 'index.php';
</script>
";
} else {
echo "
<script>
alert('data gagal ditambahkan!');
document.location.href = 'index.php';
</script>
";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Tambah data siswa</title>
<link rel="stylesheet" href="css/style_user_action.css" />
</head>
<body>
<div class="container">
<div class="forms-container">
<div class="signin-signup">
<form action="" method="post" class="sign-in-form" enctype="multipart/form-data">
<h2 class="title">Tambah Data Siswa</h2>
<div class="input-field">
<i class="fas fa-user"></i>
<input type="text" placeholder="Absen" name="absen" required autocomplete="off" autofocus>
</div>
<div class="input-field">
<i class="fas fa-lock"></i>
<input type="text" name="nama" placeholder="Nama" autocomplete="off">
</div>
<div class="input-field">
<i class="fas fa-user"></i>
<input type="text" name="jurusan" placeholder="Jurusan" autocomplete="off">
</div>
<div class="input-field input-field-rememberme">
<i class="fas fa-user"></i>
<input type="file" name="gambar">
</div>
<input type="submit" value="Tambah" class="btn solid" name="submit" />
</form>
</div>
</div>
<div class="panels-container">
<div class="panel left-panel">
<div class="content">
<h3>New here ?</h3>
<p>
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Debitis,
ex ratione. Aliquid!
</p>
<button class="btn transparent" id="sign-up-btn">
<a style="color: #fff; text-decoration: none;" href="index.php">Back to dashboard</a>
</button>
</div>
<img src="img_style/log.svg" class="image" alt="" />
</div>
</div>
</div>
</body>
</html>