Giter VIP home page Giter VIP logo

mariadb-developers / php-quickstart Goto Github PK

View Code? Open in Web Editor NEW
16.0 1.0 8.0 362 KB

This repository contains a simple web application that demonstrates how to quickly connect to and communicate with a MariaDB database using PHP (via mysqli).

License: MIT License

PHP 80.57% CSS 19.43%
mariadb mariadb-database mariadb-skysql mysqli mysqli-connection php php-mysqli mariadb-php php-mariadb php-driver

php-quickstart's Introduction

PHP Quickstart

This repository contains a simple web application that demonstrates how to quickly connect to and communicate with a MariaDB database using PHP (via mysqli).

โš ๏ธ Interested in using MariaDB and PHP with PDO (PHP Data Objects)? Check out the quickstart here!

Getting Started

The application in this repository demonstrates how to:

  • Connect to a MariaDB database using mysqli
  • Execute queries (SELECT, UPDATE, INSERT and DELETE) to manage contact data (like a digital rolodex)
  • Use prepared statements

Prepare the database

The application relies on a single database (rolodex) that contains a single table (contacts). You can find the necessary SQL for setting up the environment in schema.sql.

Run the application

After you've pulled down this repository, follow these steps to get the app up and running:

  1. Update the database configuration settings in config.php (which is used across the app) to point to your MariaDB database.

    Example configuration:

    $databaseHost = '127.0.0.1';
    $databaseUsername = 'user_name';
    $databasePassword = '********';
    $databaseName = 'rolodex';

    Note: Check out the config_skysql.php file for an example of how to connect to MariaDB SkySQL.

  2. Run the application using the built-in web server.

    $ php -S localhost:5000

Helpful Resources

Support and Contribution

Please feel free to submit PR's, issues or requests to this project directly.

If you have any other questions, comments, or looking for more information on MariaDB please check out:

Or reach out to us directly via:

License

License

php-quickstart's People

Contributors

rhedgpeth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.