</ul> <div class="page-heading"> <h1>Add Category</h1> </div> <div class="form-container"> <?php $branch = new branch(); $all_branch = $branch->get_branches(); $branch_menu_type = new branch_menu_type(); $ID = isset($_GET['id']) ? $_GET['id'] : NULL; if (isset($_POST['add_branch_menu_type'])) { // Update old record if (isset($ID)) { $results = $branch_menu_type->update_branch_menu_type($_POST, $ID); } else { // Insert new $results = $branch_menu_type->insert_branch_menu_type($_POST); } if ($results) { echo '<div class="alert alert-success" role="alert">'; echo isset($_GET['id']) ? 'Updated ' : 'Added '; echo 'branch Menu Type Sucessfully </div>'; } else { echo '<div class="alert alert-danger" role="alert"> Error </div>'; } } if (isset($ID)) { $branch_menu_type_result = $branch_menu_type->get_branch_menu_type($ID); }