<?php
session_start();

include '../koneksi.php';
if (isset($_POST["edit"])) {
    $idbarang = $_POST["idbarang"];
    $nama_barang = $_POST["nama_barang"];
    $harga = str_replace('.', '', $_POST['harga']);


    $sql = mysqli_query($konek,"UPDATE barang SET nama_barang='$nama_barang',harga='$harga' WHERE idbarang='$idbarang'");
    header("Location: ../barang.php");
}
?>