By 12/02/2016 1 Comments

How To Set And Get Session Data In PHP

  • It is a part of statement management in websites.
  • Session stores user information at server side OR it remembers the user activity on the web.
  • Once information is set in a session variable that information will be available on all web pages entire in a website.
  • $_SESSION[] super global array is a session variable and used to store information.
  • Session uses a cookie to store its unique ID in client’s machine (web browser).

Example: index page

  // assigns data into session variables.
  $_SESSION["site_name"] = "TutorialsTown";
  $_SESSION["site_url"] = "";
   View session data on another page 

Example: page-2



echo "Webiste is: " . $_SESSION["site_name"]; 
echo "Url: " . $_SESSION["site_url"];

Posted in: PHP, Solutions

Leave your valuable Comment

Have a natural attraction for women cosmetics and replica watches uk clothes, no
more than two for men the most attractive one, is to make their own driving experience, happy and can serve as the facade of the car, another is to highlight the taste edify sentiment rolex replica watch. The replica rolex is undoubtedly the most fashionable accessories, wear a suit to attend the activities, but also get a decent match on the replica watches .