Retrieve variables saved in $_SESSION PHP?

  • Thread starter Thread starter Cathy V
  • Start date Start date
C

Cathy V

Guest
1. I created a page named page1.php that directs to page2.php

2. I put this code on page1.php
$a="username"
session_start();
$_SESSION['user']=$a;

3.How can I retrieve $_SESSION['user'] on page2.php just using sessions? ( I didn't link to page2.php this way:page2.php?&user=$a b/c I can simply retrieve variable $a using $_REQUEST['user'] )

I really appreciate your help!
 
Back
Top