Monday, 2 February 2015

Session

Session stored values in  variables, and from this variables we can fetch data on multiple pages .
to create session we should start it first example :
<!DOCTYPE html>

<html>
<body>

<?php
//its start session
session_start();

//set variable for session
$_SESSION['mysession']='php-guides';
?>

<p style="color:red">Session Value=<?php print($_SESSION['mysession']);?></p>

</body>
</html>

Output Print:


No comments: