Hi all,
Last night i was building a simple shopping cart. Im new to PHP so i was just doing a simple session based one. I stored my products into a session array so that every page could have access to them. Then i had a few other session variables such as total num of products, price, category selected.. etc.. in total i had about 10 variables + a two dimensional array which had all the product though there were only 5. It was 2D because each product then had a few attributes, like price, id, description, category and a couple of others.. not that much stuff. The products were added 1 by one, line by line.
Then i came to the point when i tried to add a new session variable, i recieved no error but i could not print the variable or have it show up anywhere... tried and tried with no luck. It wasnt till i deleted one of my early variables and made it a local variable that suddenly my new variable worked. I didnt get any sort of error before or after.
I have a news script (cute news) running as well (though not on the same page) but it is not session based, but cookie. I assume because i didnt edit it and i saw that there was an option for session based news and the default was cookie based.
Anyway, does anyone know if i can somehow check memory usage, or what not because 10 variables + an array cant be that much of a drag on resources and i dont understand why i hit that... no more variables limit.
Thanks a lot in advance.
Last night i was building a simple shopping cart. Im new to PHP so i was just doing a simple session based one. I stored my products into a session array so that every page could have access to them. Then i had a few other session variables such as total num of products, price, category selected.. etc.. in total i had about 10 variables + a two dimensional array which had all the product though there were only 5. It was 2D because each product then had a few attributes, like price, id, description, category and a couple of others.. not that much stuff. The products were added 1 by one, line by line.
Then i came to the point when i tried to add a new session variable, i recieved no error but i could not print the variable or have it show up anywhere... tried and tried with no luck. It wasnt till i deleted one of my early variables and made it a local variable that suddenly my new variable worked. I didnt get any sort of error before or after.
I have a news script (cute news) running as well (though not on the same page) but it is not session based, but cookie. I assume because i didnt edit it and i saw that there was an option for session based news and the default was cookie based.
Anyway, does anyone know if i can somehow check memory usage, or what not because 10 variables + an array cant be that much of a drag on resources and i dont understand why i hit that... no more variables limit.
Thanks a lot in advance.
Comment