NYCPHP Meetup

NYPHP.org

[nycphp-talk] preventing randomized session variable from changing when page is refreshed

Kristina Anderson ka at kacomputerconsulting.com
Wed Aug 20 19:18:04 EDT 2008


Ajai-- this part I'm fine on....it's just the matter, really, of after 
instantiating that session variable, locking it in.  I think I've 
decided to do the include file thing so that index.php is not 
accessible after the first view....that way they can't restart the 
session unless they retype in the domain address, which is highly 
unlikely...if so, they will have to start over.

I've got everything going into the database in a table whose structure 
is prodID, sessionID fields in each row, so they can add an unlimited 
amount of stuff.  I just have to guard against that sessionID changing 
because it will wipe out their cart.  If that explains it better.

> On Wed, 20 Aug 2008, Kristina Anderson wrote:
> 
> > John -- store the cart items in the $_SESSION array and only write 
to 
> > the database when they check out?
> 
> Sure, that would work.
> 
> Or store using a database table temporary session data (some PHP 
> frameworks have support for that and have the added advantage of 
working 
> across a cluster of servers).
> 
> You dont need to reinvent the wheel.
> 
> 
> -- 
> Aj.
> 
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
> 
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
> 
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
> 
> 





More information about the talk mailing list