开发者

How to do this?

开发者 https://www.devze.com 2023-01-06 02:09 出处:网络
I logged into an online forum created by using PHP and was browsing some topics in the web site. Since the weather was hot, I got to have a bath and left my computer idle for a short while. When I cam

I logged into an online forum created by using PHP and was browsing some topics in the web site.

Since the weather was hot, I got to have a bath and left my computer idle for a short while.

When I came back to my computer, I pressed a "Add Post" icon.

But When I pressed to submit the new topic,the web site redirected me to the Log in page,

I gussed my cookie might have been expired. And then after I logged into the web site again,

开发者_如何学JAVAmy new post was created. I am wondering how they do this.

What is the method and technique they used?

Did they store my new post to a new cookie or session first when they found that my cookie was expired?


You could do that by storing the post's content into a cookie and once you log the user in, check the cookies that you have set. If you have a cookie set with the content you would create a post with, create the post and remove the cookie. This should work with sessions as well. All depends on how you set your login system.

0

精彩评论

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