Re: echo SESSION var doesn't work if unset after echo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2008-12-09 at 19:11 +0000, ceo@xxxxxxxxx wrote:
> Fire up Live HTTP Headers in Firefox.
> 
> 
> 
> My theory is that the browser is RE-requesting the data because of the private, must-revalidate.
> 
> 
> 
> So it goes like this:
> 
> 
> 
> Browser -> GET -> Ecomm: fooie ; unset Ecomm
> 
> Browser -> GET -> Ecomm: [not set]
> 
> 
> 
> If you are using Ajax and JS and whatnot, the probability of this being the culprit increases. :-)
> 
> 
> 
If the php is executed because of a GET request, i.e. from a link, then
the page could well be requested twice. I've seen this happen before,
where I was adding entries to a database when a user navigated to a
certain page from a link. The way I solved it was to add a timestamp and
check to see if an exact duplicate entry had been made within the last n
seconds before adding it. You could add a time value to the session and
check against this before unsetting the session?


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux