Algorithm

Create Login with PHP and MySQL
Create Login with PHP and MySQL : Home
Algorithm
Sign Up Process
Log In Process
Log Out Process

Algorithm
Lets say that we have some Secret Data that we will show only to our Logged in users. So let me show the whole process:

  1. Sign Up user and put user's details in the database
  2. Ask user to Log In
  3. Get the Log In credentials from form using POST method
  4. If the credentials are correct then Log In user and show the Secret Data
  5. Else we will show Incorrect credentials and ask to Log In again
  6. Log out user on user's request

1. Sign Up user and put user's details in the database

2. Ask user to Log In

3. Get the Log In credentials from form using POST method

4. If the credentials are correct then Log In user and show the Secret Data

5. Else we will show Incorrect credentials and ask to Log In again

6. Log out user on user's request

There may be flaws in this Algorithm, we will handle those while we encounter such problems. It is just the whole Log In process design.

Login to Track Your Progress