- Notifications
You must be signed in to change notification settings - Fork10
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
mariadb-developers/php-quickstart
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository contains a simple web application that demonstrates how to quickly connect to and communicate with aMariaDB database usingPHP (viamysqli).
⚠️ Interested in using MariaDB and PHP withPDO (PHP Data Objects)? Check out the quickstarthere!
The application in this repository demonstrates how to:
- Connect to a MariaDB database using
mysqli - Execute queries (
SELECT,UPDATE,INSERTandDELETE) to managecontact data (like a digitalrolodex) - Use prepared statements
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 inschema.sql.
After you'vepulled down this repository, follow these steps to get the app up and running:
Update the database configuration settings inconfig.php (which is used across the app) to point toyour MariaDB database.
Example configuration:
$databaseHost ='127.0.0.1';$databaseUsername ='user_name';$databasePassword ='********';$databaseName ='rolodex';
Note: Check out theconfig_skysql.php file for an example of how to connect toMariaDB SkySQL.
Run the application using thebuilt-in web server.
$ php -S localhost:5000
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:
About
This repository contains a simple web application that demonstrates how to quickly connect to and communicate with a MariaDB database using PHP (via mysqli).
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
