I am able to upload an image file path to the database, although when trying to update it, the file name show as blank on the db.
<input type='file' id='image' name='image'>
$target_dir = "assets/img/products/";
$target_file = $target_dir . basename($_FILES["image"]["name"]);
move_uploaded_file($_FILES["image"]["tmp_name"], $target_file);
$img = mysqli_real_escape_string($conn, $target_file)
$sql = "UPDATE products SET image = '$img' WHERE product_ID='$index'";
mysqli_query($conn,$sql) or die(mysqli_error($conn));