title: isset and empty is not fixing the undefined index notice, this causes not to update my data in sql
body: <p>I did a research, I've already initialized an isset and empty function but it's not helping to solve the undefined index, because of this, I can't update all my data in sql, even the images are not showing and updating, any other solution for this?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;?php
  
  session_start();
  include("../db_connection.php");
  
  
  if(empty($_POST['food_id'])) {
  
  var_dump($_POST);
   $food_id = $_POST['food_id'];
  $seller_id = $_SESSION['seller_id'];
  $food_name = $_POST['food_name'];
  $f_price = $_POST ['f_price'];
  $f_ingredients = $_POST ['f_ingredients'];
  $f_status = $_POST['f_status'];
  $date_posted = $_POST ['date_posted'];
  $time_posted = $_POST ['time_posted'];
  
  $extension = pathinfo($_FILES['f_image']['name'], PATHINFO_EXTENSION);
  
          $sql = mysqli_query($db, "UPDATE 'food_product'
                      SET
                      food_id = '$food_id',
                      food_name = '$food_name',
                      f_price = '$f_price',
                      f_ingredients = '$f_ingredients',
                      f_status = '$f_status',
                      date_posted = '$date_posted',
                      time_posted = '$time_posted'
                      WHERE food_id='$food_id'");
      if ($sql)
      {
  
          $id = mysqli_insert_id($db);
          $filename = $id.'.'.$extension;
  
          if(move_uploaded_file($_FILES['f_image']['tmp_name'], 'food_upload/'.$filename))
          {
              mysqli_query($db,"UPDATE food_product
                                  SET f_image = '$filename' 
                                  WHERE food_id = '$id' ");
          }   
  
          header('location: seller_menu.php');
  
      }
      else
      {
  
          mysqli_error($db);
      }   
   }
  ?&gt;
  </code></pre>