The forums ran from 2008-2020 and are now closed and viewable here as an archive.

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #24496


    I’m working on implementing a basic php registration and login script from I have it up and running on my server, and it works fine. However, I’m a little uncertain how to protect a page from non-registered users. Once a user registers, they can access a certain page.

    What I have in mind is simply allowing a user to register, and once registered, allowing that user access to another form where that information entered into that form is entered into the database under that users name. Like a contest where you have to be registered to play the contest, and once you are registered you can submit your answers.

    I have the login authentication and registration working, but am stuck on how to do the above.

    Here’s the main.php script that a user is greeted with:


    Jpmaster77’s Login Script

    echo “

    Logged In

    echo “Welcome $session->username, you are logged in.

    .”[username”>My Account]   ”
    .”[Edit Account]   “;
    echo “[Admin Center]   “;
    echo “[Logout]”;


    num_errors > 0){
    echo ““.$form->num_errors.” error(s) found“;

    Username: value(“remember”) != “”){ echo “checked”; } ?>>
    Remember me next time     

    [Forgot Password?]
    Not registered? Sign-Up!

    echo “Member Total: “.$database->getNumMembers().”
    echo “There are $database->num_active_users registered members and “;
    echo “$database->num_active_guests guests viewing the site.




    Any suggestions?

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.