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();
?>
<?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
Post a Comment