php go back in history headers code example Example: php previous site header('Location: ' . $_SERVER['HTTP_REFERER']);