RE: [PHP] Cookies & page refresh
| From: | Peter Lauri | Date: | Wed, 13 Dec 2006 01:22:02 +0000 |
| Subject: | RE: [PHP] Cookies & page refresh | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245777@lists.php.net to get a copy of this message | ||
Hi,
I think it says somewhere in the documentation that the cookie values will
not be available until next request/response...
/Peter
-----Original Message-----
From: William Stokes [mailto:kalles@operamail.com]
Sent: Tuesday, December 12, 2006 5:28 PM
To: php-general@lists.php.net
Subject: [PHP] Cookies & page refresh
Hello,
I have a page that uses session cookies for deciding what content to show to
a visitor. User also has 2 form objecks to apply filters to the content SQL
queries. So at the beginning of the script I set 2 cookies based on user
selections(or defaults) and after that make DB query based on user
selections. I wanted to use cookies because there also "back - up -
forward" links for pagination.
Problem is that in order to get the cookie based system to work the page
needs a refresh to read the cookies and display content corretly. Is this
because the page loads faster than the server set's the cookies to client
browser? If so what's the "corrert" / best way to implement the filters and
page navigation if there's 2 form select lists and 3 links to navigate the
page.
Thanks
-Will
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php