Home  >  Article  >  Backend Development  >  php determines whether there is login

php determines whether there is login

藏色散人
藏色散人Original
2019-10-12 10:57:422925browse

php determines whether there is login

php determines whether the user is logged in

The following example uses Session to determine whether the user is logged in:

functions.php

 
        

Username:

Password:

'; }else{ // 登录显示欢迎页面 echo 'Welcome, '.$_SESSION['username']; } } ?>

index.php

 


My Page


      

For more PHP related knowledge, please visit PHP Chinese website!

The above is the detailed content of php determines whether there is login. 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