require_once SOURCE_ROOT . 'components/class.validation.inc.php'; require_once SOURCE_ROOT . 'classes/class.category.php'; // CREATING THE CLASS OBJECTS FOR INCLUDING CLASS FILES $objCategory = new Category(); //add example details if Example ID is blank if ($_POST['frmAddEdit'] != '') { if ($objCategory->AddCategory($_POST)) { header($_SESSION['sessCategoryRedirectURL']); exit; } else { if ($_POST['frmCategoryID'] != '') { header('location:category_frm_uil.php?CategoryID=' . $_POST['frmCategoryID']); } else { header('location:category_frm_uil.php'); } exit; } } //take action on selected check box if ($_POST['frmChangeAction'] != '' || $_SESSION['sessUpdateList'] != '') { if ($_POST['frmChangeAction'] == 'Delete' || $_POST['frmChangeAction'] == 'Active' || $_POST['frmChangeAction'] == 'Inactive') { $_SESSION['sessUpdateList'] = $_POST; header('Location:category_confirm_action.php'); exit; } //$_SESSION['sessUpdateList'] = $_POST; $objCategory->validAction($_SESSION['sessUpdateList']); } else { header($_SESSION['sessCategoryRedirectURL']); die; }