ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-general
php-general
Re: [PHP] Cookies & page refresh
by Chris other posts by this author
Dec 12 2006 8:38PM messages near this date
Re: [PHP] Cookies & page refresh | Re: [PHP] $POST Q
William Stokes wrote:
>  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.

Use a session variable instead. Otherwise I could modify the cookie and 
change the query / queries being run really easily... causing sql 
injection and a bunch of other issues.

-- 
Postgresql & php tutorials
http://www.designmagick.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Peter Lauri
William Stokes
Chris

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved