[wp-hackers] Using php Sessions
Matt Slocum
mattslocum at sharefaith.com
Fri Mar 30 00:30:11 UTC 2012
Hi,
I'd like to keep track of some visitor's data while they browse my site and
modify some navigation options based on their behaviors. I could do this
using php's set_cookie() and store some info and make the desired
modifications. Using cookies is somewhat iritating because I have to do my
logic that I want included into the cookie before the headers are sent.
I've done other PHP programming on non-wordpress sites and I normally use
SESSIONS. I know that WordPress does not use sessions by default. It would
be nice to use them since I could change some of the session data after the
tracking cookie has been sent, and it would still persist because of the
nature of sessions.
Is there any reason that I shouldn't use php sessions on my site?
Both styles would send another cookie. I guess non-session style would use
fewer system resources. Is that the only reason?
Thanks,
Matt
More information about the wp-hackers
mailing list