<?php 
include '../koneksi.php';
session_start();
$id = $_SESSION['id'];
$password1 =$_POST['password'];
$password2 =$_POST['password2'];

if ($password1==$password2) {
    $password = md5($_POST['password']);
    
    mysqli_query($koneksi, "UPDATE anggota SET password='$password' WHERE angg_id='$id'")or die(mysqli_errno());
    
    header("location:gantipassword_angg.php?alert=sukses");
} else {
    header("location:gantipassword_angg.php?alert=rakembar");
}    
    