persistant user preferences any advive?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
coolmoon
Forum Newbie
Posts: 4
Joined: Sun Jan 07, 2007 9:30 am

persistant user preferences any advive?

Post by coolmoon »

Hello all,

I am still new to php and looking for advice on saving user preferences
I am working on a CMS and would like to save user preferences such as
table sort order, pagnation # of page defaults, and so on. I am using
sessions to track users and store some temporary variables.

wondering which would be best saving serverside and parsing file into
variables , setting cookies or somthing else

using php 4.3 and mysql


Thanks

coolmoon
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

If you have "users" with logins and all the rest, use server-side storage like a DB or a per-user include file and the var_export() function.

If not, I would just use cookies ($_COOKIE)
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

XML or INI files?
coolmoon
Forum Newbie
Posts: 4
Joined: Sun Jan 07, 2007 9:30 am

Post by coolmoon »

Thanks for the reply

will play with the var_export() function and see what I can do with it

coolmoon
Post Reply