Is it possible to redirect a user to different pages, using PHP location header, depending on the page he came from?
I have multiple HTML forms all over my website that perform the same deleting action when I click on the submit button. And I also have multiple PHP files for each HTML form where the only difference is the location header url.
header('location:file.php');
Is there a way to have only one PHP file which redirects to the previous page or something?
$_SERVER
array for a referrer. – Jay Blanchard