Home  >  Article  >  Backend Development  >  How to query the current username in php

How to query the current username in php

(*-*)浩
(*-*)浩Original
2019-10-15 11:08:433559browse

How to query the current username in php

Generally use session (SESSION) to determine whether to log in, as well as login user name and other information. (Recommended learning: PHP video tutorial)

//登录页面

Another page

SESSION represents the session value, he The survival time is the period during which the browser is opened, which means that once the browser is closed, the session value will disappear. And one characteristic of the session value is that during the session value life cycle, pages with the same domain name can access the session value generated by the domain name. For example, if Baidu knows the session value generated by the page, then in the newly opened Baidu Encyclopedia The page can also be accessed.

The above is the detailed content of How to query the current username in php. For more information, please follow other related articles on the PHP Chinese website!

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
Previous article:How to pass php to javaNext article:How to pass php to java