Answers for "access data stored in session php"

PHP
7

set php varibianle session

<?php 
  // Start the session
  session_start();
?>
<!DOCTYPE html>
<html>
  <body>
  <?php
    // Set session variables
    $_SESSION["color"]= "blue";
    $_SESSION["animal"]= "dog";
    echo "The session variable are set up.";
  ?>
  </body>
</html>
Posted by: Guest on March-30-2020
0

can we acces session variable in two files

<?php
  session_start();

  ...

  if($responseCode == 1) {
    $_SESSION['card_id']    = $_POST['card_id'];
    $_SESSION['password']   = $_POST['password'];
    print '<script type="text/javascript">'; 
    print 'window.location = "http://domain.com/File2.php";';
    print '</script>';
  }
?>
Posted by: Guest on August-13-2020

Code answers related to "access data stored in session php"

Browse Popular Code Answers by Language