开发者

Excel, Php, and sessions

I want to export an Excel table with PHP. That table contains links to the actual website. The problem is that these links can only be seen by an authenticated user. When I click the links in the Excel file, even if I've logged in to my website (so technically there is a session already started), the page won't open, but ins开发者_StackOverflowtead redirects me to the login screen (so it starts another session).

Any solutions?


What you will probably want to do is to create a unique identifier for the user. This key would be appended to the end of the URL. When the user clicks on the URL in the file, the key would then log them into the site on the specific page they clicked on.

The generated URL would look something like this:

http://www.mysite.com/linkedpage.php?SK=asdsomerandomstring123

If they need to be saved, then the session values will need to be saved in the database either in a serialized array or individually.

There are inherent security issues with allowing login based on a key in the URL, so you will need to weigh the convenience of what you are trying to do against any security issues that will come with it.


This question is bogus :)

There must be a bug in my app, because the session info is being kept when I click the link in excel.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜