<?php
    require 'koneksi.php';
    
    $id = $_POST['id'];
    $nama = $_POST['nama'];
    $gambar = $_FILES['gambar']['name'];
    $harga = $_POST['harga'];
    $kategori = $_POST['kategori'];

    move_uploaded_file($_FILES['gambar']['tmp_name'], 'picture/'. $gambar);
    
    mysql_query("update menu set nama = '$nama', harga = '$harga', gambar = '$gambar', kategori_id = '$kategori' where id_menu='$id'");
    header('Location: admin_menu.php');
?>