PHP session Cannot get value

Source: Internet
Author: User
Tags php session
Write a session to pass the value of the small demo, the results in the second page does not get the value of the normal.

untitled-4.php


  
   
  
   使用-注册
  
   ";}if(!isset($_SESSION["usernmae"])){    $_SESSION["username"]=$user;     echo  "超链接测试按钮";}?>

untitled-4.php


  
   
  
   使用-第三页验证表单
  
   请问是我传session的值有问题吗?为什么获取不到

Reply content:

Write a session to pass the value of the small demo, the results in the second page does not get the value of the normal.

untitled-4.php


  
   
  
   使用-注册
  
   ";}if(!isset($_SESSION["usernmae"])){    $_SESSION["username"]=$user;     echo  "超链接测试按钮";}?>

untitled-4.php


  
   
  
   使用-第三页验证表单
  
   请问是我传session的值有问题吗?为什么获取不到

The first page of 24 rows if(!isset($_SESSION["usernmae"])) should be usernmae username

The second page 13 row echo "欢迎你,".$_SESSION["usernmae"].",进入第三页"; in Usernmae should be username

Session_Start ()?

You var_dump look.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.