0

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

1 Answer 1

3

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().

Sign up to request clarification or add additional context in comments.

2 Comments

yess i have include session_start(); also please let me know how i create sessions from session id
What is it that you wish to obtain? To fetch the session defined by the token id? Then you just pass the ID you want for your session before you call session_start().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.