> What is the proper way to transfer class properties through-out my
> pages...
>
> if (!session_is_registered("myCart")){
> $myCart = new ShoppingCart();
> (some other stuffs...)
> session_register("myCart");
> }
you dont need to do this,
> else {
> $myCart = new ShoppingC
What is the proper way to transfer class properties through-out my pages...
let's say i have a ShoppingCart Class and i have methods like
addToCart(id, qty) and deleteFromCart(id)
also i have properties like CartItems("id" => array(), "qty"=> array())
this is what i do...
//when the user enters
I think your mising the point. I use classes to create more modular code, I
find it keeps my code structured and easy to modify for other sites. I can
have a class for one site, I can then copy that class and easily modify it
to suit for another site. I do not use my classes for storeing data (ie.
Hi,
Can a class be stored as a session variable?
If not, what advantage is there to using classes in php?
I kind of see classes as used for things that will be frequently accessed/stored in
memory, but with php(web) the code is basically executed once with nothing remaining
in memory. Seems kind
yes this will work, are you passing the class as a session ? remember to declare the
class BEFORE you call session_start()
ie.
do not have session_start before the class declaration.
how do you like postgres? what version? speed/reliability/stability ? In some
benchmarks I did I found postg
hi,
i'm busily rewriting an exisitng calendar system that is in use at work.
we're using UML as a design tool and hope to have an OO version of the
system we have at the minute that wil 'fit in' with future devs.
our system at the moment makes heavy use of postgresql and i am hoping to
populate
6 matches
Mail list logo