$product_obj->useProductTable();
 //------------------------------------------------------------------------------
 if ($mode == "insert") {
     // Check at first that this item is still not available in the database:
     if ($debug) {
         echo "current mode is insert!<br>";
     }
     if ($product_obj->item_number_exists($selian_item_number)) {
         // The item still exists in the database!
         $ERROR_MSG .= "Sorry, this item with code \"" . $selian_item_number . "\" still exists in the database! <br>\r\n                   Please check the field Selians item number, you can just update or delete it!<br>";
         $ERROR_SELIAN_ITEM_NUMBER = TRUE;
         $ERROR = TRUE;
     } else {
         // This is a new item, store it into the database
         $product_obj->setDataArray($db_buffer);
         $product_obj->insertDataFromInternalArray();
         $MSG .= "Item with code \"" . $selian_item_number . "\" is now archived in the database<br>";
     }
 }
 // end of if ($mode=="insert")
 //------------------------------------------------------------------------------
 if ($mode == "update") {
     if ($debug) {
         echo "current mode is update!<br>";
     }
     if ($product_obj->item_number_exists($selian_item_number)) {
         // The item still exists in the database!
         if ($debug) {
             echo "Database fields are:";
             print_r($db_buffer);
         }