array( "Back to accounting" => "accounting-main.php", ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a accounting was selected if (isset($_POST['accounting_id'])) { ?>
Are you very sure you want to remove this and its associated records?
No accounting selected
beginTransaction(); $stmt = $db->prepare(" DELETE FROM ${DB_TABLE_PREFIX}accounting_tracking WHERE AccountingID = ? "); $res = $stmt->execute(array($_POST['accounting_id'])); if ($res !== FALSE) { ?>
Accounting tracking info deleted
Error deleting accounting tracking info!
errorInfo()) ?>
rollBack(); } if ($res !== FALSE) { $res = $db->exec("DELETE FROM ${DB_TABLE_PREFIX}accounting WHERE ID = ".$db->quote($_POST['accounting_id'])); if ($res) { ?>
Accounting deleted
Error deleting accounting!
errorInfo()) ?>
rollBack(); } } # Commit if last transaction succeeded if ($res) { $db->commit(); } } else { ?>
Accounting not deleted, aborted by user
Invocation error, no accounting ID
Invalid invocation