Questions about how the new login user replaces the data of the original login user
Source: Internet
Author: User
New login users replace the original login user data information 1. when a user logs on, the user information is stored: $ _ SESSION ['logname'] = $ username; 2. query the user email storage directory based on user information: $ home = $ mysql-& gt; selectDirByName ($ username ); 3. replace the data of the original login user with the new login user
1. storing user information during user logon:
$ _ SESSION ['logname'] = $ username;
2. query the user mail storage directory based on user information:
$ Home = $ mysql-> selectDirByName ($ username );
3. read and send emails from the directory:
// Xml file name of the Mail Index (xml includes the Mail's from, title, to, date, bodyId, attachId)
$ Items = $ home ['home']. "/". $ index. ". items"; ($ index indicates the number of the inbox and the sender, such as 1 and 2)
// Parse the index
$ Audit = parse_xml_config ($ region, "mailindex ");
4. list emails based on the parsed email information.
This is the general process.
Problem: log on to two users in the same browser. the newly logged on user information will replace the logged on user information. I thought I replaced the mail storage directory in step 2, but I added unset ($ home) before. Which of the following problems may cause the problem? If the description is unclear, please advise.
------ Solution --------------------
The same browser must be like this. when you log on to 2nd, the first one will become 2nd ....
This is amazing if you want to open two browsers.
------ Solution --------------------
$ _ SESSION ['logname'] = $ username;
==>
$ _ SESSION ['logname'] [] = $ username;
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.