Reputation: 68
In my website a registered user navigates through various components, I am thinking of using session variable for all communications between components instead of a POST /GET. Is this a right thing to do?
I have several custom joomla 2.5 components written by me. Things like login welcome page, application1 and so on. Now the welcome page has buttons to these applications and instead of using a post/get I am thinking of using session variables. I am new to web technologies and I want to know pros and cons of this approach.
Upvotes: 0
Views: 286
Reputation: 39532
There's no need to use superglobals like $_SESSION
when you're using a CMS like Joomla. Instead, use:
JRequest::setVar("varName");
and
JRequest::getVar("varName");
Upvotes: 1