Reputation: 2066
i have following in my url http://www.foo.com/?token=foo&tokenid=fooid now i want to get those token and tokenid value and create sessions from both values... i have following in my php code
$em = $_GET['token'];
$emid = $_GET['tokenid'];
$_SESSION['foo'] = $em;
$_SESSION['fooid'] = $emid;
but it is not creating sessions ... how can i solve that
Upvotes: 0
Views: 80
Reputation: 2631
Did you remember session_start()
before assigning the values?
See the manual if you are in doubt.
If you really mean that you want to create a session from the tokens you should have look at session_id().
Upvotes: 3