php header to go on the previous page code example Example: php previous site header('Location: ' . $_SERVER['HTTP_REFERER']);