} ///get tool_id if we are editing an existing tool. $toolbody->setToolDesc($_POST['tooldesc']); $toolbody->setMfgPartNO($_POST['mfgpartno']); $toolbody->setTypeID($_POST['ToolBody_Type_ID']); if (isset($_POST['cdiameter'])) { $toolbody->setCdiameter($_POST['cdiameter']); } if (isset($_POST['ndiameter'])) { $toolbody->setNdiameter($_POST['ndiameter']); } if (isset($_POST['sdiameter'])) { $toolbody->setSdiameter($_POST['sdiameter']); } if (isset($_POST['flutelength'])) { $toolbody->setFluteLength($_POST['flutelength']); } if (isset($_POST['reach'])) { $toolbody->setReach($_POST['reach']); } if (isset($_POST['toolmaterial'])) { $toolbody->setBodyMaterial($_POST['toolmaterial']); } if (isset($_POST['noofflutes'])) { $toolbody->setNoOfFlutes($_POST['noofflutes']); } if (isset($_POST['Brand_ID'])) { $toolbody->setBrandID($_POST['Brand_ID']); } else { if (isset($_POST['Brand_ID_E'])) { $toolbody->setBrandID($_POST['Brand_ID_E']);