Possible Duplicate:
How do I continue a session from one page to another with PHP
I have this $_SESSION:
$_SESSION['user']['id'];
How can I send this, to another page with PHP?
Possible Duplicate:
How do I continue a session from one page to another with PHP
I have this $_SESSION:
$_SESSION['user']['id'];
How can I send this, to another page with PHP?
You do not need to "send" anything. $_SESSION
is repopulated on each request when you call session_start()
based on the session identifier in the PHPSESSID
cookie sent by the browser.
Page A:
session_start();
$_SESSION['user']['id'] = 3;
Page B:
session_start();
echo "User ID is: " . $_SESSION['user']['id']; //prints 3