function Delete($mysqli,$table_name, $where_clause=){   

  $whereSQL = ;

  if(!empty($where_clause)) {

    // check to see if the where keyword exists

    if(substr(strtoupper(trim($where_clause)), 0, 5) != WHERE) {

      // not found, add keyword

      $whereSQL =  WHERE .$where_clause;

    } else {

      $whereSQL =  .trim($where_clause);

    }

  }

  $sql = DELETE FROM `.$table_name.` .$whereSQL;

  return mysqli_query($mysqli,$sql);

}