how keep session between pages
-
Afte reading about this top I have done the following, put
if (!seesion_id()) { session_start(); }
at the top of the wp-config file
I also have the following code on a wp page
if (isset($_session["user"])) { doit("yes "); doit($_session["user"]->ScreenName); } else { doit("no session"); $_session["user"] = new userClass; }
the function doit() simply displays the paramater on the page.
I am always getting “no session” so obviously session is not working.
Anyone has any ideas?
With normal php you always put session_start() top of every page but with wp you don’t so is that a problem here??
Thanks
- The topic ‘how keep session between pages’ is closed to new replies.