Return to previous page after update
I want to return the user to the previous page after he has updated the form.
I tried setting $UpdateGoTo" to "$_SERVER['HTTP_REFERER'];" but it failed.
What should I type in?
I want to return the user to the previous page after he has updated the form.
I tried setting $UpdateGoTo" to "$_SERVER['HTTP_REFERER'];" but it failed.
What should I type in?
You don't know the name of the previous page because it might come from multiple pages?
In that case, I'd probably set a session variable on each of the possible previous pages and use that for the redirect.
Yes, I have 2 different pages that call up this page to update the data.
How do I set a session variable for $UpdateGoTo?
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"]
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.