Skip to content

CallumC1/userAuthPHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

This is a template using PHP, MYSQLI and Tailwindcss to create a signup / login example. This also uses PHP Sessions to keep track of the authenticated status. Goal: The goal of this is to make it as secure as possible and as portable as possible.

SQL Commands

CREATE DATABASE phpUserAuth;

USE phpUserAuth;

CREATE TABLE users (
    user_id int PRIMARY KEY AUTO_INCREMENT,
    first_name varchar(50) NOT NULL,
    last_name varchar(50) NOT NULL,
    email varchar(150) NOT NULL UNIQUE,
    password_hash TEXT NOT NULL,
    user_roles VARCHAR(50) DEFAULT 'user' NOT NULL
);

About

A simple, first try at a user authentication system using PHP

Resources

Stars

Watchers

Forks

Contributors