$toolstock->setRemarks($_POST['remarks']); } if (isset($_POST['tooloal'])) { $toolstock->setToolOAL($_POST['tooloal']); } if (isset($_POST['binid'])) { $toolstock->setBinID($_POST['binid']); } if (isset($_POST['Tool_Condition_ID'])) { $toolstock->setToolCondition($_POST['Tool_Condition_ID']); } if (isset($_POST['Tool_Storage_ID'])) { $toolstock->setCurrentLocation($_POST['Tool_Storage_ID']); } if (isset($_POST['tmax'])) { $toolstock->setTMax($_POST['tmax']); } // print("<br>tool id=$toolid"); $toolstock->saveToolStock(); } elseif (isset($_POST['Supplier_ID'])) { //print_r($_POST); //print_r($_FILES); if (isset($_POST['Tool_ID'])) { $toolstock->setToolID($_POST['Tool_ID']); $toolid = $_POST['Tool_ID']; } else { $toolid = ''; } ///get tool_id if we are editing an existing tool. if (isset($_POST['price'])) { $toolstock->setPrice($_POST['price']);