Lets us Go, we are talking about php session value that how to pass php session value.
First create index.php file and save into folder and write down this code.
index.php
<html> <title>Session Solution</title> <head><head> <body> <form method=""> Name:- <input type="text" name="uname"><br><br> Password:- <input type="password" name="password"><br><br> <input type="submit" name="submit" value="save"> </form> </body> </html> <?php session_start(); if(isset($_POST['submit'])){ $_SESSION['uname'] = $_POST['uname']; $_SESSION['password'] = $_POST['password']; } ?>
Then create session.php file and save into folder and write down this code.
session.php
<?php session_start(); $_SESSION['uname'] = $uname; $_SESSION['password'] = $password; echo $uname; echo $password; ?>