Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-12-2011, 12:46 AM   PM User | #1
macleodjb
Regular Coder

 
Join Date: Apr 2007
Posts: 317
Thanks: 24
Thanked 3 Times in 3 Posts
macleodjb is on a distinguished road
Opinion on Class Property VS Session Var

Hi Guys,

I am looking for a way to store some data that i will need to call on alternate pages. What is the best way to accomplish this task. Should i define a property in my class (not sure if it will hold the page refresh) or should i send me data into a custom session variable. Or is it best to use a cookie? I've never used cookies before so i am ignorant to their ease or difficulty of use. Which way is best? I will need to be able to call this information and then overwrite it upon demand.

Thanks.
macleodjb is offline   Reply With Quote
Old 03-12-2011, 06:15 AM   PM User | #2
Dormilich
Senior Coder

 
Dormilich's Avatar
 
Join Date: Jan 2010
Location: Behind the Wall
Posts: 2,855
Thanks: 9
Thanked 288 Times in 284 Posts
Dormilich is on a distinguished road
then you’ll most likely need session variables, as objects don’t persist in a page reload.
__________________
please post your code wrapped in [CODE] [/CODE] tags
Dormilich is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:57 AM.


Advertisement
Log in to turn off these ads.