Can a get value be applied to multiple pages
Such as:
Page A via URL link get pass value to b page B page no problem
But under B There is a link click and will jump to C page C page also need a page of the Get value but click on the B page link after the Get value disappears, can not find. How to solve this problem?
Reply content:
Can a get value be applied to multiple pages
Such as:
Page A via URL link get pass value to b page B page no problem
But under B There is a link click and will jump to C page C page also need a page of the Get value but click on the B page link after the Get value disappears, can not find. How to solve this problem?
Programme one:
你可以在B页面的链接添加$_GET['xx'],只要从A页面带参数跳转到B页面的话,那B页面的链接就必然会带上刚刚的$_GET['xx']参数.这是点击链接跳转到C页面也就可以接受刚刚从A->B的参数了.
Scenario Two:
在B页面使用SESSION或者COOKIE存储$_GET['xx']参数,在C页面通过读取SESSION或者COOKIE来获取参数.
When you generate the HTML for page B, you can add the arguments passed in a to the URL, which you can simply do:
">Page C
Another way is to consider the existence of variables in the session.
$param = parse_url( $_SERVER['HTTP_REFERER'] );list($key, $val) = explode('=', $param['query']);
You can consider using the session, according to your needs, the page opened through hyperlinks belong to the same session ...
The feeling describes a scenario, whether it can describe the requirements, that is, why.
Yes, you can use the session, or you can use the URL behind the stitching method