After a PHP web user logs on, the user logs on and logs off. before logging on, the user only displays questions about the registered login connection.

Source: Internet
Author: User
After a PHP web user logs in, the user logs out. before login, only the registration login connection problems are displayed, as shown in the following figure. I use PHP. & lt; div & gt; & lt; ul & gt; & lt ;? Phpsession_start (); echo $ _ SESSION ['username']; & nbsp ;? & Gt; & lt; li & gt; Login & l the PHP webpage user logs in and logs out. only the registration Login connection is displayed before logon.
For example, I use PHP.


    Session_start ();
    Echo $ _ SESSION ['username'];
    ?>
  • Login

  • Apply for user1

  • Apply for user2



------------ The above is written in index. php ------------

I want to log on. login, Apply for user1, Apply for user2 are not displayed. only the user name and logout are displayed.
After logging out, login, Apply for user1 .......
Please teach me.

------ Solution --------------------
Please provide the complete index. php code.
------ Solution --------------------
PHP code
  
  
  
  • User name
  • Cancel
  • Login
  • Apply for user1
  • Apply for user2

------ Solution --------------------
Discussion

PHP code
Session_start ();
?>


  • User name

  • Cancel


  • Login

  • Apply ......

------ Solution --------------------
Session_start ();
?>


  • User name

  • Cancel


  • Login

  • Apply for user1

  • Apply for user2



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.