This topic is locked
[SOLVED]

 CustomAdd redirect

8/4/2017 7:39:10 PM
PHPRunner General questions
H
headingwest author

Hi All,
Any idea how to redirect after a CustomAdd?
I don't want to add to the table I'm editing, I want to save to a temp table and then redirect to the edit of the temp table.
I've tried the following near the end of the CustomAdd but it's not working:

header("Location: http://localhost:8085/paymenttemp_edit.php?editid1=".$values['paymentid';]);

H
headingwest author 8/4/2017

So to solve this I added a Session variable and redirected when returned to the list page.
In CustomAdd;
$_SESSION['temppayment'] = 1;
In List page BeforeProcess
if ($_SESSION['temppayment'] == 1) {

$_SESSION['temppayment'] = 0;

header("Location: http://localhost:8085/account_list.php";);

}