Git Product home page Git Product logo

php-and-mysql-example's Introduction

PHP and MySQL Example

An example of a web application using:

  • PHP 7.4.4
  • MySQL
  • Bootstrap.

The problem

You work for a company that has tripled in size over the past few years and the way the vacation process works is no longer efficient, as it requires a combination of handwritten applications, approvals, storage, and maintenance. You are asked to create a portal where employees can request their vacation online, the manager receives a notification to approve or decline that request, and the information (time used, balances) is stored within the portal.

Database

database.sql file contains the SQL statements to create the database tables.

EER Diagram

alt text

Installation

  • Run database.sql file in MySQL server to create tables.
  • Add an administrator user with e-mail [email protected] and password 123 using the query:
    INSERT INTO users (first_name, last_name, email, password_hash, is_admin) VALUES ('John', 'Doe', '[email protected]', '$2y$10$ExUqrgC2jjBAlMiqqfLICeq7TBw2AUcHDVsXIH3dii50NmDeF6GTK', '1')
    
  • Set the variables in the configuration file

Configuration File

config.ini file contains the essential variables that should be set:

  • db_host: Hostname or IP address of MySQL server.
  • db_user, db_password: Username and password that will be used to connect to MySQL server.
  • db_name: Database name.
  • admin_email: Administrator's e-mail that will be receiving the e-mails to approve/reject the employee's applications 

php-and-mysql-example's People

Contributors

elgaspar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.