Redirect to previous page after update
I have been trying to find in the forums for a solution on how to redirect to a previous page after the update button has been clicked. For example if I am on page-1.php and click on a record to go to the updatePage-Rec.php...I would like to return to page-1.php and the same if I were on page-2.php.
I tried to follow the following:
Use the server behavior "Set Session Value" on each page that links into the form. Set the same session variable name with the value corresponding to the page name you are on.
But the page does not redirects.
I created a Session Variable on my product-options.php, named previousPG then I set the Session value to
Trigger: any form post
Session name: previousPG
Value: productioptions.php
On my productoptions-edit.php page I set the After Update Go to value to <?php echo $_SESSION['previousPG']; ?>