<?php
require_once('session.php');

$postID = $_POST['postID'];
$pass = password_hash($_POST['pass'], PASSWORD_DEFAULT);
$re_pass = $_POST['pass'];


    // Code for updating with password change
    $query = mysqli_query($conn, "UPDATE `admin` SET `password` = '$pass' WHERE cuid = '$postID'") or die(mysqli_error());
    $_SESSION['user'] == '';
    unset($_SESSION['user']);
    session_destroy();
    header('location:../');

?>
