I am making a site's authentication system in which the sign up form isn't located at index and it isn't going to be at index. If a user is already signed in and wants to fill sign up form, the script tells him that you're already signed in with the following account. It is ok to do that or not? I've seen Google telling that re-enter your password and email is already filled and also picture and name are also displayed.

1 Answer 1


Why don't you have the site so that if a user is signed in, they don't see the sign-in section of the site?

Or if it's a menu, logged in users see a menu option called logout, all other users see a menu option called login/sign-up.

  • +1 you don't need to block access to the page, merely block access to the link to the page.
    – schroeder
    Commented Jul 7, 2014 at 14:40
  • I don't have a link to sign up form on the protected page. If user accesses signup.php manually. What should I do? Commented Jul 7, 2014 at 15:20
  • Presumably you are tracking if the user is logged in using cookies or something similar? If so, the first line of the signup.php should be something like (and this is off the top of my head so may not be valid): if isset($_SESSION['loggedin']){ redirect to main page else "You need to login..."
    – TimC
    Commented Jul 7, 2014 at 15:24
  • I am tracking user through session. If session is set, then tell user he is already logged in with the account of following credentials. I have added a option to proceed to sign up form anyways. Commented Jul 7, 2014 at 15:26
  • @TimC I have figured it out. Thanks for participating Commented Jul 7, 2014 at 15:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .