No designations found for this branch.
"; } } else { echo "Please select a branch.
"; } }else{ echo "No results to display!
Fill the form for Add New Designation
home/abhiramc/public_html/acts.service/dashboard.designation.reg.php 0000644 00000026424 15021147576 0021674 0 ustar 00 getConnection(); $off = new office($db); $stmtoff = $off->off_read(); $numoff = $stmtoff->rowCount(); // Check if the form has been submitted if (isset($_POST['save'])) { // Capture the form data $branch_id = $_POST['offbranch']; $designation = $_POST['dg_name']; // Check if the branch is selected and designation is entered if ($branch_id != '-1' && !empty($designation)) { // Prepare the query to insert data into acts_designation table $query = "INSERT INTO acts_designation (branch_id, dg_name) VALUES (:branch_id, :dg_name)"; // Prepare statement $stmt = $db->prepare($query); // Bind the parameters $stmt->bindParam(':branch_id', $branch_id); $stmt->bindParam(':dg_name', $designation); // Execute the query if ($stmt->execute()) { // Success: Data saved successfully echo ""; } else { // Error: Failed to insert data echo ""; } } else { // Error: Validation failed echo ""; } } ?>
No designations found for this branch.
"; } } else { echo "Please select a branch.
"; } }else{ echo "No results to display!
Fill the form for Add New Designation