https://github.com/avs123a/php-auth-example
Simple php authentification example using sessions
https://github.com/avs123a/php-auth-example
composer headers htaccess mariadb php php7 portfolio session test-task
Last synced: 4 months ago
JSON representation
Simple php authentification example using sessions
- Host: GitHub
- URL: https://github.com/avs123a/php-auth-example
- Owner: avs123a
- Created: 2018-04-17T16:18:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-02T05:49:24.000Z (almost 8 years ago)
- Last Synced: 2025-01-15T22:43:50.206Z (about 1 year ago)
- Topics: composer, headers, htaccess, mariadb, php, php7, portfolio, session, test-task
- Language: PHP
- Size: 54.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Simple PHP Authentification Example
Directory structure:
- api
api.php - file with functions (register, check unique, login/logout, ... );
- config
db.php - file with database connection settings ( host, user, password, database);
- vendor(after composer installing) - folder for dependencies installed via composer;
- src - folder for main files
cabinet.php
login.php
login.html
logout.php
signup.php
signup_procedure.php
- root directory:
.htaccess - routing rule
Requirements:
- PHP >= 7.1
- MariaDB >= 10.1
Installing:
- clone this repository
- composer install
- change database settings in \config\db.php
- create database and execute sql queries from test12.sql file
IF YOU WANT TO RUN SITE NOT FROM DOMAIN ROOT:
- configure server virtual host similar to httpd-example.conf file
or examples: https://httpd.apache.org/docs/2.4/vhosts/examples.html
Notes :
- Configuration is dependent on server features, OS type ...
- If you run this website on server environment that using special variables ( %hostdir% , ...)
like OpenServer, virtual hosts will not working.