Question: Session in Php
What Is a Session?
A session is a way to store information (in the form of variables) to be used across multiple pages.A PHP session allowing you to store user information on the server for later use. PHP session user information is temporary if you want to store permanently then store information in the database.
The session_start() function must appear BEFORE the "html" tag.
This is PHP session example for store information in the session variable and retrieve data from the PHP session like:
<?php session_start(); // store session data $_SESSION['name']="deepak"; ?> <html> <body> <?php //retrieve session data echo "User name is ". $_SESSION['name']; ?> </body> </html>