PHP & MySQL Tutorial
Learn how to use PHP & MySQL
PHP is the most popular scripting language for web development. It is free, open source and server-side (the code is executed on the server).
MySQL is a Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). It is also free and open source.
The combination of PHP and MySQL gives unmet options to create just about any kind of website – from small contact form to large corporate portal.
MySQL is the most popular database system used with PHP.
PHP + MySQL Database System
- PHP combined with MySQL are cross-platform (you can develop in Windows and serve on a Unix platform)
- “mysql_connect” is the PHP built-in function for connecting to MySQL database
- “servername” is the name of the server running MySQL server.
- “username” is the name of the user that we will use to authenticate ourselves when connecting to the server.
- “password” is the password that we will use to authenticate ourselves when connecting to the server.
What is MySQL?
MySQL is an open-source relational database management system (RDBMS). It is the most popular database system used with PHP. MySQL is developed, distributed, and supported by Oracle Corporation.
- The data in a MySQL database are stored in tables which consists of columns and rows.
- MySQL is a database system that runs on a server.
- MySQL is ideal for both small and large applications.
- MySQL is very fast, reliable, and easy to use database system. It uses standard SQL
- MySQL compiles on a number of platforms.
Downloading MySQL Database
MySQL can be downloaded for free from this link.
How to connect PHP with MySQL Database?
PHP 5 and later can work with a MySQL database using:
- MySQLi extension.
- PDO (PHP Data Objects).