-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocEditMember.php
More file actions
34 lines (26 loc) · 928 Bytes
/
Copy pathprocEditMember.php
File metadata and controls
34 lines (26 loc) · 928 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
include("config.php");
if (isset($_POST['daftar'])) {
date_default_timezone_set(ASIA/JAKARTA);
$id = $_POST['id'];
$nama = $_POST['nama'];
$jenisKelamin = $_POST['jenisKelamin'];
$alamat = $_POST['alamat'];
$username = $_POST['username'];
$password = $_POST['passwd'];
$level = $_POST['lvl'];
$tglSimpan = date("y-m-d");
$sql = "UPDATE profile SET nama='$nama', jenisKelamin='$jenisKelamin', alamat='$alamat', tglSimpan='$tglSimpan', username='$username', passwd='$password', lvl='$level' WHERE id='$id'";
$query = mysqli_query($db, $sql);
if( $query ) {
// kalau berhasil alihkan ke halaman index.php dengan status=sukses
header('Location: listMember.php');
} else {
// kalau gagal alihkan ke halaman indek.php dengan status=gagal
die("gagal menyimpan perubahan");
}
} else {
# code...
die("Akses dilarang...");
}
?>