【发布时间】:2013-12-14 15:09:23
【问题描述】:
在吸引人的页面上
$storeID= $_REQUEST['store'];
$custID= $_REQUEST['cust'];
我在不同页面上有指向上述页面的链接,如下所示
在第 1 页。
echo "<a class='btn btn-info' rel='nofollow' target='_blank' href='/go-to-store.php?store=" . $KID . "&cust=" . $user_ID . "'>" . "shop" . "</a>";
在第 2 页。
echo "<form action='/go-to-store.php' target='_blank' method='post'>"
. "<input type='hidden' name='store' value='$postid'>"
. "<input type='hidden' name='cust' value='$user_ID'>"
. "<button class='btn btn-mini btn-info' type='submit' style='margin-top:5px;'>"
. "shop" . "</button>";
这两种方式都是有效的可接受的做事方式吗?我没有理由不向用户展示这些价值观,任何人都没有改变这些价值观的危害或动机。
我正在跟踪我的网站上的问题,并且基本上缩小了任何可能的情况,即有可能导致我遇到的问题的可能性很小。
【问题讨论】:
-
使用
$_SESSION变量 -
使用 session 或 cookie 来存储变量,不要在 cookie 中存储纯密码。
-
我的网站是建立在 wordpress 之上的,但是包含信息的文件在外面。如果我在wordpress 中移动cathing 文件,我可以轻松获得custID 而无需发送它...我将这样更改它。抱歉,如果我的问题不够具体。
标签: php parameter-passing