pass value from one php page to another using session

page1.php     //store value in session

<?php
session_start();
$_SESSION['myValue1']=$_GET['cctnspsid'];
$_SESSION['myValue2']=$_GET['dairyDate'];
$_SESSION['myValue3']=$_GET['srno'];

?>




page2.php  // use session value in another page

<?php
session_start();
echo $_SESSION['myValue1'];
session_destroy();

?>

Comments

Popular posts from this blog

datatable with both top and bottom scroll bar.

Display Loader and disable page while waiting for ajax request

Invalid bean property or is not readable to loading Jsp page