Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "koneksi.php";
- if (isset($_POST['submit'])){
- if (isset($_POST['anggotaId'])){
- $anggotaId = mysqli_real_escape_string($mysqli, trim($_POST['anggotaId']));
- $anggotaNama = mysqli_real_escape_string($mysqli, trim($_POST['anggotaNama']));
- $username = mysqli_real_escape_string($mysqli, trim($_POST['username']));
- $password = mysqli_real_escape_string($mysqli, trim($_POST['password']));
- $alamat = mysqli_real_escape_string($mysqli, trim($_POST['alamat']));
- $query = mysqli_query($mysqli, "UPDATE t_anggota SET anggotaNama='$anggotaNama',
- username='$username', password='$password', alamat='$alamat' WHERE anggotaId='$anggotaId'");
- if($query){
- echo "<center><h4>Data berhasil !!</h4></center>";
- echo "<script>window.location='dashboard.php?action=Anggota';</script>";
- }else{
- echo "<center><h4>Data gagal di rubah!!</h4></center>";
- echo "<script>window.location='dashboard.php?action=Profil';</script>";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement