Home > Article > Backend Development > 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!