How to do a if logged in show logout link/profile link and if not show the login link, in php code I have tried but failed I have gotten the username to post but that is about it I am also still learning php. I have spent the last 4 days searching and cant find a solution except ones for drupal or wordpress which I dont use so any help would be massively appreciated :)
wastedkill
0
Newbie Poster
Recommended Answers
Jump to PostHow do you track if user is logged in? It would help if you posted some code.
Usually users are tracked in session array so if you use this method, check the values there. something like:
// start the session (on the very top of the script) …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.