if ($db_add_vendor->add_Vendor($add_vendor)) { unset($_SESSION["vendor_creation_form_details"]); header("Location: " . VIEW_PATH . "vendor_operations.php?vendor_add_result=sucess"); exit; } else { header("Location: " . VIEW_PATH . "vendor_operations.php?vendor_add_result=error"); exit; } } else { header("Location: " . VIEW_PATH . "vendor_operations.php?survey_create_err=" . $validated); exit; } } if (isset($_POST) && isset($_POST["modify_vendor"])) { $modify_vendor = new Vendor($_POST); $modify_vendor->initiallize_Vendor_Data($_POST); $validated = $modify_vendor->validate_Form_Data(); if ($validated == "No_ERROR") { $db_modify_vendor = new DB_Vendor(); if ($db_modify_vendor->modify_Vendor($modify_vendor, $_POST["vendor_id"])) { unset($_SESSION["vendor_creation_form_details"]); header("Location: " . VIEW_PATH . "modify_vendor_details.php?vendor_id=" . $_POST["vendor_id"] . "&vendor_modify_result=sucess"); exit; } else { header("Location: " . VIEW_PATH . "modify_vendor_details.php?vendor_id=" . $_POST["vendor_id"] . "&vendor_modify_result=error"); exit; } } else { header("Location: " . VIEW_PATH . "modify_vendor_details.php?vendor_id=" . $_POST["vendor_id"] . "&vendor_modify_err=" . $validated); exit; }