theonethatownz Posted January 22, 2015 Share Posted January 22, 2015 Hello, I am making a UCP to go along side a game server. The game server adds a mysql row when a account is created and places the password under Whirlpool encryption. I am looking for someone who can help me make a basic login page that needs to enter a user name and password, with the password then encrypting to Whirlpool or whatever needs to be done for the login to be a success. I am a total new guy to HTML / PHP scripting and looking to do this as a learning project. Quote Link to comment Share on other sites More sharing options...
scootstah Posted January 23, 2015 Share Posted January 23, 2015 We're not here to create your projects for you. If you have specific questions, or are having trouble with something specific then we can absolutely help out with that. To create persistent authentication (being able to login on one page, and stay logged in on subsequent pages) you're going to need to know how PHP sessions work. At the beginning of all your scripts you will need to start a session with session_start(). This will allow you to pass data between pages with the $_SESSION superglobal. You will need a login script which will process a form containing a username and password. The login script will hash the password, and then do an SQL SELECT query to find rows that match that username and (hashed) password. If a row is found, then the user can be logged in. Usually you would add some sort of data to the $_SESSION to say that the user is authenticated. On subsequent pages, you can check that the data in $_SESSION shows that they are logged in. If they're not logged in, redirect back to the login page. There are hundreds of tutorials out there for PHP login systems. I recommend that you do some research and try to work this out on your own. If possible, try to find tutorials that were written within the last few years. There are still some very old and outdated ones floating around that will do you no good. After that, if you get stuck or have some more specific questions, then please feel free to come back and we will be glad to help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.