Jump to content

Recommended Posts

Hello, I would ask a little favour from you guys. I have a login system here where people can register and login. There is simple code to protect areas that only people who have logged in can see it:

 

if (!is_authed())

 

I wanted to ask that could somebody please fix me 2 things there:When you are logged in then register.php and login.php are not available for you. Also I would be happy if somebody could add remember and retrive password function there. Here are files:

 

http://www.team-kommando.com/login.rar

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/54952-login-system/
Share on other sites

Dude, we are all here to help each other and learn from each other, so 1, i am going to give you some advice on how you can achieve this and 2, i am not going to code for you.

 

use sessions, if a user is logged in, store his/her username in a session and insert some kind of div, where there is an if statement or something, like this: if(isset($_SESSION['username'])){ //show that the user is logged in}else{ //show login and register link}

 

and do the same for all your pages you do not want visitors to see, just authentica with a session

Link to comment
https://forums.phpfreaks.com/topic/54952-login-system/#findComment-271758
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.