Related questions displayed on the home page when PHP jumps from the login interface to the home page
Source: Internet
Author: User
When PHP jumps to the home page from the login interface, the questions displayed on the home page will be answered! How can I display "XXXwelcome!" on the home page when I migrate from login.html#to homepage.html !". I use session, and then read data from the database ., & Lt ;? Phpsession_start (); if (I PHP questions displayed on the home page when you jump from the login interface to the home page
Newbie on the road, please answer! How can I display "XXX welcome!" on the home page when I migrate from login.html#to homepage.html !". I use session, and then read data from the database.
?>
------ Solution --------------------
Jump from login.html to homepage.html. you cannot jump to homepage.html directly, right?
Is there a checked php file in the middle? Or are you wrong about the two php files?
Php file
Session_start ();
Echo $ _ SESSION ['username']; // the variable name here is the name defined during login detection.
------ Solution --------------------
Homepage.html is a static page. can I read the SESSION?
------ Solution --------------------
Yes.
Change your homepage.html to homepage. php
Discussion
Homepage.html is a static page. can I read the SESSION?
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.