Reply to Re: [PHP] Preventing data from being reposted?

Your name:

Reply:


Posted by Jochem Maas on 03/03/05 16:43

rory walsh wrote:
> Yeah I got it, cheers. Actually the problem I am getting is more to do
> with my session variables I think? Here is the jist of the code.
>
> if(log out button has been pressed)
> {
> session_variable="no"
> }
>
> if(log in button has been pressed)
> {
> session_variable="yes"
> }
>
> if(session_variable=="yes")
> {
> display the string "you have logged in" and place a button on the page
> so they can log out.
> }
> else display you are not logged in

the psuedo code seems ok - no way of knowing how this reflects
on your actual code tho.

>
> The problem is that I can always get back to the "you have logged in"
> display by simply pressing back, even though once the user hits the
> logout button the variable is no longer "yes"? I have to hit the back
> button a few times to get the "you have logged in" message. No doubt
> there are mistakes elsewhere in my code, but can anyone just verify that
> the above code should run without a problem?

maybe you are looking at cached pages in your browser?

if 'session_variable=="yes"' equates to true then you should send out
headers that tell the browser not to cache the output (or make it
private/force-revalidation)

>
>
>
>
> Jochem Maas wrote:
>
>> eoghan wrote:
>>
>>> i think ive missed a few mails there...?
>>>
>>> rory walsh wrote:
>>>
>>>> Cheers, I'll take a look, I had tried a search but thunderbird
>>>> didn't find anything, even with the exact thread title I had to
>>>> google it? Anyway I'll take a look.
>>
>>
>>
>> my first google hit on search for the exact title gave me this:
>>
>> http://www.issociate.de/board/post/171234/Clear_POST_variables_on_page_refresh.html
>>
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация