unable to get $_SESSION variable

前端 未结 3 651
难免孤独
难免孤独 2021-01-12 04:56

\"this
In Log-in.php I have

  $email=$_POST[\'email\']; 
  $pass=$_POST[\'         


        
3条回答
  •  孤街浪徒
    2021-01-12 05:31

    session_start();

    $_SESSION["user"] = $result['full_name'];
    $_SESSION["user_id"] = $result['user_id'];
    $_SESSION["website_type"] = $result['user_id'];
    

    // this is my code ... // i cant access in another page ..

    // second page enter code here session_start(); // print_r($_SESSION);

        echo $_SESSION['user'];
        echo $_SESSION['user_id'];
        echo $_SESSION['website_type'];
    

提交回复
热议问题