Hi,
I am making an update on the current record and want to load/refresh the
page again. I tried : header(“Location: TFilesList”);
if ($action == "applyTag") { // Check action name
$newRow = ["tags" => $row["tags"] . " " . $_SESSION['lastTag']]; // Array of field(s) to be updated
$result = $this->update($newRow, ["id" => $row["id"]]); // Update the current record only (the second argument is WHERE clause for UPDATE statement)
if (!$result) { // Failure
$this->setFailureMessage("Failed to update record, id = " . $row["id"]);
return false; // Abort and rollback
} else { // Last row
$session = Session();
$session->set('scrollToFile', $row["id"]);
$this->setSuccessMessage("All selected records updated.");
}
header("Location: TFilesList");
return true;
}
return true;