You can just set it to the session value.
On each page you can set a session variable like:
<?php
@session_start();
$_SESSION["PageFrom"] = $_SERVER["REQUEST_URI"];
session_commit();
?>
Then on your update page, set the go to page to the session variable: $_SESSION["PageFrom"]