Home  >  Article  >  Backend Development  >  关于PHP网页用户登陆后显示注销.而登陆前则只显示注册登陆连接的有关问题

关于PHP网页用户登陆后显示注销.而登陆前则只显示注册登陆连接的有关问题

WBOY
WBOYOriginal
2016-06-13 13:33:08992browse

关于PHP网页用户登陆后显示注销.而登陆前则只显示注册登陆连接的问题
如题.我是用PHP的.



    session_start();
    echo $_SESSION['username']; 
    ?>
  • Login

  • Apply for user1

  • Apply for user2



------------以上是在index.php写的------------

我是想当登陆后.login , Apply for user1 , Apply for user2都不显示.只显示用户名和注销.
然后注销后就会显示回login , Apply for user1…….
求大神们教教我.

------解决方案--------------------
请给出index.php完整代码.
------解决方案--------------------
PHP code
<?php session_start();
?>
  • 用户名
  • 注销
  • Login
  • Apply for user1
  • Apply for user2

------解决方案--------------------
探讨

PHP code
session_start();
?>


  • 用户名

  • 注销


  • Login

  • Apply……

------解决方案--------------------
session_start();
?>


  • 用户名

  • 注销


  • Login

  • Apply for user1

  • Apply for user2



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn