-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproses.php
More file actions
34 lines (23 loc) · 721 Bytes
/
proses.php
File metadata and controls
34 lines (23 loc) · 721 Bytes
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
<?php
require 'koneksi.php';
if(isset($_POST['submit'])){
$nisn = $_POST['nisn'];
$nama = $_POST['nama'];
$alamat = $_POST['alamat'];
$jenis_kelamin = $_POST['jenis_kelamin'];
$namaFoto = $tglAndWaktu.$_FILES['foto']['name'];
$foto = $_FILES['foto']['tmp_name'];
move_uploaded_file($foto, 'media/foto_profile/'.$namaFoto);
$sql = "INSERT INTO siswa (id, nisn, nama, alamat, jenis_kelamin, foto) VALUES ('', '$nisn', '$nama', '$alamat', '$jenis_kelamin', '$namaFoto')";
$result = mysqli_query($conn, $sql);
if ($result) {
echo "<script>
alert('data berhasil ditambah');
</script>";
}
}
if ($_GET['edit']) {
}
if ($_GET['delete']) {
}
?>