PHP PART- 4 CODE?



PHP PART- 4 CODE -: 


  • index.php
    • <?php
      session_start();
      $_SESSION['name'] = 'master-tech786';
      $_SESSION['pass'] = '123';
      if(isset($_SESSION['name'])) {
      echo 'Session sucessfull';
      }
      ?>


  • session_fetch.php
    • <?php
      session_start();
      echo 'Session Value = '.$_SESSION['name'];
      echo 'Session password = '.$_SESSION['pass'];
      session_destroy();


      echo '<br>Session Value = '.$_SESSION['name'];
      echo 'Session password = '.$_SESSION['pass'];
      ?>





No comments