Session variable not displayed in another page

六眼飞鱼酱① 提交于 2019-12-13 08:19:43

问题


i am using two webpage in menu.php i am not able to get the detail of session variable it will display undefined index.

controller.php

    $info = mysql_fetch_array( $data );  
   session_start();
   // store session data
   $type="$info[TYPE]";
   $no="$info[NO]";

   $_SESSION['type']=$type;
   $_SESSION['no']=$no;
   echo "Pageviews=". $_SESSION['type'];
   echo "Pageviews=". $_SESSION['no'];
   header('Location:menu.php');

menu.php

    <?php sesstion_start();
     echo "Pageviews=". $_SESSION['type'];
    echo "Pageviews=". $_SESSION['no'];
    ?>

回答1:


sesstion_start();

See anything wrong in here? :P



来源:https://stackoverflow.com/questions/17953570/session-variable-not-displayed-in-another-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!