<?php
    include("config.php");
    $product_title = isset($_POST['product_title'])? $_POST['product_title']:'';
    $product_desc = isset($_POST['product_desc'])? $_POST['product_desc']:'';
    $product_amount = isset($_POST['product_amount'])? $_POST['product_amount']:'';
    $id = isset($_POST['id']) ? $_POST['id']:'';
    
        
        $update = $conn->prepare("UPDATE product SET product_title=?,product_desc=?,product_amount=? WHERE product_id=?");
        $update->bind_param("ssss", $product_title,$product_desc,$product_amount,$id);
        $update->execute();
        if($update == true){
             header("Location:product.php");
        }else{
            header("Location:index.php");
        }
            
    
    
    
?>