PHP - Maintaining a session over multiple pages

page1.php

<?php
session_start();
$_SESSION['username']=" My user rahul";
?>

page2.php

<?php
session_start();
if(isset($_SESSION['username'])){
echo "your session is runing".$_SESSION['username'];
}
?>

Comments

Popular posts from this blog

Script For Login, Logout and View Using PHP, MySQL and Bootstrap

Hyperledger Development with in 10 days — Day 6

Insert CheckBox and Radio button Data in MySQL Database Using PHP