
<?php
if (isset($_POST["product"]))
{
$food=$_POST["product"];
$price=$_POST["price"];
$masa=date("ymdhis");
$nameFile=$email.$masa.$_FILES["gambar"]["name"];

move_uploaded_file($_FILES["gambar"]["tmp_name"],"product/".$nameFile);

//update database

mysqli_query($newcon,"DELETE FROM tbl_product (product_name,product_price,product_pic) value ('$product','$price','$nameFile')") or die (mysqli_error($newcon));

echo "Successful DELETE Product";


}

?>