-
Notifications
You must be signed in to change notification settings - Fork 4
/
registrasi_siswa.php
66 lines (56 loc) · 1.95 KB
/
registrasi_siswa.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
<?php
// session_start();
?>
<script type="text/javascript">
function validasi(){
var kompetensi = (form1.kompetensi.value);
if(kompetensi == 0){
alert("Pilih Bidang Kompetensi.");
document.form1.kompetensi.focus();
return false;
}
}
</script>
<div class="card py-1 px-2">
<div class="alert alert-info">
<p class="text-center">Lengkapi formulir blanko pendaftaran siswa dibawah ini.</p>
</div>
<form role="form1" name="form1" action="aksi-registrasi.html" method="post" onsubmit="return validasi()">
<div class="form-group">
<label for="nisn">NISN</label>
<input type="text" name="nisn" placeholder="Masukkan NISN" class="form-control" id="nisn" required>
</div>
<div class="form-group">
<label for="nama">Nama Lengkap Siswa</label>
<input type="text" name="nama" placeholder="Nama Lengkap" class="form-control" id="nama" required>
</div>
<div class="form-group">
<label for="asal">Asal Sekolah</label>
<input type="text" name="asal" placeholder="Asal Sekolah" class="form-control" id="asal" required>
</div>
<div class="form-group">
<label for="email">Email Siswa</label>
<input type="email" name="email" placeholder="alamat email" class="form-control" id="email" required>
</div>
<div class="form-group">
<label for="kompetensi">Kompetensi</label>
<select class="form-control" name="kompetensi" id="kompetensi">
<option value="">pilih bidang kompetensi</option>
<?php
include "config/koneksi.php";
$aktif = "Y";
$query = "SELECT * FROM kompetensi WHERE aktif = '$aktif' ORDER BY id_kompetensi";
$sql = mysqli_query($conn, $query) or die(mysqli_error($conn));
while($data = mysqli_fetch_assoc($sql)):
?>
<option value="<?=$data['id_kompetensi'];?>"><?=$data['bid_kompetensi'];?></option>
<?php
endwhile;
?>
</select>
</div>
<div class="float-right">
<button type="submit" class="btn btn-primary" name="submit">Submit</button>
</div>
</form>
</div>