I am trying to set up my mailadd.php page to redirect to custom page to process the last inserted record using the Last Insert ID which i have already declared. However i tried to set a custom page redirect below in the add.php page generated by phpmaker code but it still keeps redirecting to the mail-list.php page after a new record has been successfully inserted instead of redirecting to "process-sql.php"
BELOW IS WHAT I MODIFIED IN THE ADD PAGE
case "A": // Add new record
$this->SendEmail = TRUE; // Send email on add success
if ($this->AddRow($this->OldRecordset)) { // Add successful
if ($this->getSuccessMessage() == "")
$this->setSuccessMessage($Language->Phrase("AddSuccess")); // Set up success message
$sReturnUrl = $this->getReturnUrl();
if (ew_GetPageName($sReturnUrl) == "process-sql.php") // < ------------------ Presumed spot that requires changing
$sReturnUrl = $this->GetViewUrl(); // View paging, return to view page with keyurl directly
$this->Page_Terminate($sReturnUrl); // Clean up and return