This is an example project that shows how to use PHP to create an authentication system.
This project is set up as a self-contained system that uses DDEV to run. In order to run this project you need to install that system first. Once you have DDEV installed then following the following steps.
- Open up a command line and navigate to the directory that you added the project to.
- Run
ddev startto start the project. If you are starting for the first time then this will download everything you need before starting the project. - Once everything is installed you can visit https://phpsession.ddev.site/ or
run
ddev launch, which will open a browser and take you to that URL. - To install the test database (and some test users) you need to log into the
docker container using
ddev sshand runphp install.php. - You can now log in using the credentials below.
When you are finished using the project, run ddev delete to remove everything.
Log into this project with the following credentials.
| Username | Password |
|---|---|
| user1 | password |
| user2 | letmein |
Please see Creating An Authentication System With PHP and MariaDB for a detailed breakdown on how this project works and ideas for further improvement.