Jump to content

how to maintain sessions


uttam_lavate

Recommended Posts

For instance for session:

session_start();

$_SESSIOn["test"]="testing";//this places the value testing in the session under the name test.

you can retrieve this session value in any page that you visit after setting the session.

You can retrieve the session value as shown below:

$sessionvalue=$_SESSION["test"];//the variable $sessionvalue holds the value "testing".

 

For cookies:you can use setcookie() function with some parameters which specify what is the cookie name,how long should it last and so on.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.