Connecting to a
Database using PHP
5 Step Process
1. Connect to the Database
2. Query the Database
3. Present or use the data
4. Release the returned data
5. Close the connection to the Database
XAMPP
XAMPP
• X:Cross Platform
• A:Apache
• M:MySQL/MariaDB
• P:PHP
• P:Perl
Cross Platform
XAMPP
Is supported on a variety of operating systems, such as:
Windows
• X:Cross Platform Microsoft Windows is currently the most
commonly used desktop operating system
• A:Apache
• M:MySQL/MariaDB LINUX
• P:PHP LINUX is presently the most commonly
used implementation of UNIX
• P:Perl
Mac OS (OSx)
macOS is the current (Unix based) operating system
for Apple Macintosh computers
XAMPP APACHE
Apache HTTP Server
• X:Cross Platform Web Server
Developed by the Apache Software Foundation
• A:Apache Open Source & Free
• M:MySQL/MariaDB
w3techs statistics show that in 2017 Apache Server
• P:PHP is used for 49.7% of all websites
• P:Perl Followed by Nginx @ 33%
And Microsoft IIS @ 11.3%
Apache is the most popular web server on the Internet
XAMPP MySQL / MariaDB
Relational Database Management System
• X:Cross Platform RDBMS
Community developed software
• A:Apache Open Source
• M:MySQL/MariaDB
MariaDB is an enhanced, drop-in replacement for
• P:PHP MySQL, and is kept up to date with the latest MySQL
release from the same branch and in most respects
• P:Perl MariaDB will work exactly as MySQL.
All commands, interfaces, libraries and APIs that exist in
MySQL also exist in MariaDB
XAMPP PHP
PHP Hypertext Preprocessor
• X:Cross Platform Scripting Language
Widely-used open source general-purpose scripting
• A:Apache language that is especially suited for web development
and can be embedded into HTML.
• M:MySQL/MariaDB
• P:PHP
• P:Perl
XAMPP PERL
Scripting Language
• X:Cross Platform Perl is a programming language capable of running
on multiple platforms from portables to mainframes
• A:Apache and is suitable for both rapid prototyping and large
scale development projects.
• M:MySQL/MariaDB
• P:PHP
• P:Perl
XAMPP & Similar Variants
• X:Cross Platform
LAMP WAMP MAMP
• A:Apache • L:Linux • W:Windows • M:Mac OS
• M:MySQL/MariaDB • A:Apache • A:Apache • A:Apache
• P:PHP • M:MySQL • M:MySQL • M:MySQL
• P:Perl • P:PHP • P:PHP • P:PHP
• The combination of these tools allow rapid
development and delivery of web applications.
These tools are “best in class” and are well
supported
• LAMP\XAMPP is capable of delivering enterprise
scale applications