<?php require_once 'autoload.php'; $_SESSION['LAST_ACTIVITY'] = time(); $toolmisc = new Tmisc(); if (isset($_POST['desc'])) { print_r($_POST); //print_r($_FILES); if (isset($_POST['ToolMisc_ID'])) { $toolmisc->setTmiscID($_POST['ToolMisc_ID']); $tmiscid = $_POST['ToolMisc_ID']; } else { $tmiscid = ''; } ///get tool_id if we are editing an existing tool. $toolmisc->setDesc($_POST['desc']); $toolmisc->setMfgPartNO($_POST['mfgpartno']); $toolmisc->setType($_POST['type']); if (isset($_POST['price'])) { $toolmisc->setPrice($_POST['price']); } if (isset($_POST['ToolBody_ID'])) { $toolmisc->setToolBodyID($_POST['ToolBody_ID']); } elseif (isset($_POST['ToolBody_ID_E'])) { $toolmisc->setToolBodyID($_POST['ToolBody_ID_E']); } if (isset($_POST['minimumstock'])) { $toolmisc->setMinimumStock($_POST['minimumstock']); } if (isset($_POST['remarks'])) { $toolmisc->setRemarks($_POST['remarks']);