开发者

unset PHP session if page refresh

I have a registration page that uses PHP validation. The PHP comes in a separate file. I used session to pass the error messages from开发者_运维百科 the php validation handler to the registration page. I used unset(session) for other pages so when the user navigates from other page, the error msgs will be unset. What if the user tries to refresh the page by clicking the link of registration again from the navigation bar? I cannot unset the error messages from the start of registration page because it will unset the session variables before the error messages displays.


your whole approach is wrong.

just make it one PHP page and one html template.

then do whatever you want. that's the way PHP works

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜