-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdaftar_data_orangtua.php
More file actions
245 lines (209 loc) · 12.4 KB
/
daftar_data_orangtua.php
File metadata and controls
245 lines (209 loc) · 12.4 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
<?php
//start the session
session_start();
$redirect = "";
if (isset($_SESSION['is_data_parent_exist'])) {
$redirect = "<script> window.location='daftar_syarat.php'; </script>";
}else{
$redirect = "<script> window.location='daftar_syarat.php'; </script>";
}
if(isset($_POST['submit'])){
foreach ($_POST as $key => $val) {
${$key} = $val;
$_SESSION[''.$key.''] = $val;
}
if (!empty($_SESSION)) {
echo $redirect;
print_r($_SESSION);
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="apple-touch-icon" sizes="76x76" href="../assets/img/apple-icon.png" />
<link rel="icon" type="image/png" href="../assets/img/favicon.png" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>Penerimaan Siswa Baru</title>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
<meta name="viewport" content="width=device-width" />
<!-- Bootstrap core CSS -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet" />
<!-- Material Dashboard CSS -->
<link href="assets/css/material-dashboard.css?v=1.2.0" rel="stylesheet" />
<!-- CSS for Demo Purpose, don't include it in your project -->
<link href="assets/css/demo.css" rel="stylesheet" />
<!-- Fonts and icons -->
<link href="assets/css/font-awesome.min.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300|Material+Icons' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="assets/css/main.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-8 col-lg-10 col-lg-offset-1">
<div class="card" style="margin-top: 50px">
<div class="card-header" data-background-color="blue">
<h4 class="title">Data Orang Tua</h4>
<p class="category">Isi Form pendaftaran dengan benar</p>
</div>
<div class="card-content">
<form method="post" action="daftar_data_orangtua.php">
<fieldset class="the-fieldset">
<legend class="the-legend">Data Ayah</legend>
<!-- Father data form input -->
<div class="row">
<div class="col-md-12">
<div class="form-group label-floating">
<label class="control-label">Nama Ayah</label>
<input type="text" class="form-control" name="father_name" required
value="<?php isset($_SESSION['father_name']) ? print($_SESSION['father_name']) : ""; ?>"
autofocus>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group label-floating">
<label class="control-label">Tempat lahir Ayah</label>
<input type="text" class="form-control" name="birth_place_father"
value="<?php isset($_SESSION['birth_place_father']) ? print($_SESSION['birth_place_father']) : ""; ?>"
required>
</div>
</div>
<div class="col-md-6">
<div class="form-group label-floating">
<label class="control-label">Tanggal lahir Ayah</label>
<input type="date" class="form-control" name="birth_date_father"
value="<?php isset($_SESSION['birth_date_father']) ? print($_SESSION['birth_date_father']) : print("1980-01-01"); ?>"
required>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group label-floating">
<label class="control-label">Pendidikan Terakhir Ayah</label>
<input type="text" class="form-control" name="father_last_education" required
value="<?php isset($_SESSION['father_last_education']) ? print($_SESSION['father_last_education']) : ""; ?>"
>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group label-floating">
<label class="control-label">Pekerjaan</label>
<input type="text" class="form-control" name="father_job" required
value="<?php isset($_SESSION['father_job']) ? print($_SESSION['father_job']) : ""; ?>"
>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group label-floating">
<label class="control-label">Agama</label>
<input type="text" class="form-control" name="father_religion"
value="<?php isset($_SESSION['father_religion']) ? print($_SESSION['father_religion']) : ""; ?>"
required>
</div>
</div>
</div>
<!-- END Father data form input -->
</fieldset>
<fieldset class="the-fieldset" style="margin-top: 20px">
<legend class="the-legend">Data Ibu</legend>
<!-- Father data form input -->
<!-- Mother data form input -->
<div class="row">
<div class="col-md-12">
<div class="form-group label-floating">
<label class="control-label">Nama Ibu</label>
<input type="text" class="form-control" name="mother_name" required
value="<?php isset($_SESSION['mother_name']) ? print($_SESSION['mother_name']) : ""; ?>"
autofocus>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group label-floating">
<label class="control-label">Tempat lahir Ibu</label>
<input type="text" class="form-control" name="birth_place_mother"
value="<?php isset($_SESSION['birth_place_mother']) ? print($_SESSION['birth_place_mother']) : ""; ?>"
required>
</div>
</div>
<div class="col-md-6">
<div class="form-group label-floating">
<label class="control-label">Tanggal lahir Ibu</label>
<input type="date" class="form-control" name="birth_date_mother"
value="<?php isset($_SESSION['birth_date_mother']) ? print($_SESSION['birth_date_mother']) : print("1980-01-01"); ?>"
required>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group label-floating">
<label class="control-label">Pendidikan Terakhir Ibu</label>
<input type="text" class="form-control" name="mother_last_education"
value="<?php isset($_SESSION['mother_last_education']) ? print($_SESSION['mother_last_education']) : ""; ?>"
required>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group label-floating">
<label class="control-label">Pekerjaan</label>
<input type="text" class="form-control" name="mother_job"
value="<?php isset($_SESSION['mother_job']) ? print($_SESSION['mother_job']) : ""; ?>"
required>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group label-floating">
<label class="control-label">Agama</label>
<input type="text" class="form-control" name="mother_religion"
value="<?php isset($_SESSION['mother_religion']) ? print($_SESSION['mother_religion']) : ""; ?>"
required>
</div>
</div>
</div>
<!-- END Mother data form input -->
<div class="row">
<div class="col-md-12">
<div class="form-group label-floating">
<label class="control-label">Telp/HP</label>
<input type="text" class="form-control" name="telp"
value="<?php isset($_SESSION['telp']) ? print($_SESSION['telp']) : ""; ?>"
required>
</div>
</div>
</div>
</fieldset>
<?php
if (isset($_SESSION['is_data_parent_exist'])) {
?>
<button type="submit" name="submit" class="btn btn-primary pull-right">Kembali <i class="fa fa-arrow-right"></i></button>
<?php
}else{
?>
<a href="daftar_siswa_baru.php" class="btn btn-warning pull-left"><i class="fa fa-arrow-left"></i> Kembali</a>
<button type="submit" name="submit" class="btn btn-primary pull-right">Lanjut <i class="fa fa-arrow-right"></i></button>
<?php
}
?>
<div class="clearfix"></div>
</form>
</div>
</div>
</div>
</div>
</body>
</html>