Login Page POC
Docker Image ()
Some poc of a login / register setup with php & mysql
Setup:
Dependencies:
- webserver (tested with nginx)
- php 7.4
- mysqld/mariad
- Clone this repo
- Create a database
- Create a user and grant access to database
- Change "login.php" & "register.php"
- Have fun!
Features:
Implemented
- Login
- PHP Session ID
- Password Validation
- Name & Surname
- Menu with different options for logged in users on the /secure.php page
- Reset password
- Profile page (/profile.php)
- User activation
Need implementation:
- Change password (#2) (currently only via forgot password)
- Change email (#6)
- Change Names (#4)
- Page only accessible for users that are validated (#16)
Thanks for flying penguin stack overflow stealing! <3
Database Setup:
# mysql -u root -p
in the mysql shell do the following:
CREATE DATABASE usertable;
CREATE USER 'usertable'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON usertable.* TO 'usertable'@'localhost';
FLUSH PRIVILEGES;
exit
Test if you were successfull with:
# mysql -u usertable -p
Import the empty database like this:
# mysql -u usertable --password=password usertable < usertable.sql
Description
Languages
PHP
94.3%
HTML
4.9%
CSS
0.8%