php - Unable to get session varibale after redirect to another domain -


i have created session on 1 page , unable these session on page, how can able session on page.

page1.php

$_session['access_token']        = "token"; $_session['access_secret']       = "secret"; $_session['session_handle']      = "handle"; header("location: mydomain/page2.php"); 

page2.php

session_start(); if(isset($_session['access_token'])) {      echo $_session['access_token']; } else {     echo ""; } 

i have tried above code same domain or different domain.

try put session_start();in page1.php (on first line). if domains different not work


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -