Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa PHP How can we register the variables into a session?

Have Programming Question? Ask it here!
 
 
 


brijesh
How can we register the variables into a session?
1 Answer(s)      3 years and 9 months ago
Posted in : PHP


How can we register the variables into a session?


Advertisement
View Answers

November 12, 2010 at 2:48 PM


Hi

If u maintain the data along with the many request ,then we need to maintain the session. if u want to maintain the session,first u can create session given below

HttpSessio session=ServletContext.getSession();

if u want to put the data in session,Then

session.setAttribute("key","value");//here key and values are same

if u want to get the data from session,then

session.getAttribute("key");

Like that u can maintain the session



Related Tutorials/Questions & Answers:
Advertisements
Advertisements
 

 

 

DMCA.com