检索上一页的查询字符串


Retrive query strings of previous page

假设我们点击page1.php?id=1页面中的link,然后转到page2.php。我的问题是:如何在page2.php中检索page1.php上的id值?

在page1.php中设置id值为a$_SESSION['pageid']=$_GET['id']

在page2.php中检索$_SESSION['pageid'],并在访问id值后立即取消会话unset($_SESSION['pageid'])