Home page >> Related Tutorials >>Body

Case of ZBLOGPHP judging whether the user has logged in the code

Author: A little Jack    Time: 2022-09-17 20:04:01    Browse: 1228   

Today, I want to make a button visible for login. I found it on the sidebar of the default template of zblog. ZBLOG itself has this function. I believe many kids know this function as well as I do!

Before and after login:

 Case of ZBLOGPHP judging whether the user has logged in the code

code:

 {if $user.ID>0} Welcome: {$zbp ->user ->StaticName}/<a href="User Center Address">User Center</a><-- Here is the content displayed after the user logs in -->    {else} <a href="Login Address">Login</a><a href="Registered Address">Register</a><-- Here is the content displayed when the user has not logged in --> {/if}

The style depends on your website template. If you don't understand it, you can contact the Jack blogger to pay for it!


Text label: ZBLOG   Login Registration   User Center  
 A little Jack

A little Jack https://lkba.cn

The blogger focuses on Z-Blog website construction, website optimization, computer troubleshooting, reinstallation, optimization, maintenance system, etc., QQ/WX: 2126245521 (please specify the purpose)

Related articles

Previous:

Next:

No comment for this article - Welcome

 Please fill in the verification code

Processed : 0.055 SQL : 25