So far you have seen how PHP dynamically produces HTML (front-end). Now we will look at how PHP interacts with MySQL (back-end). You will learn how to connect to a database and execute data manipulation statements like INSERT, UPDATE and DELETE using PHP.
phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. It provides a user interface through which frequently used operations can be performed, while you still have the ability to directly execute any SQL statement. phpMyAdmin comes preinstalled with XAMPP.
When you installed XAMPP, you would have seen that the database that came along with it was called MariaDB and not MySQL. Both MariaDB and MySQL are very similar and can be used interchangeably. In fact, MariaDB is a fork of the MySQL open source project. This a...
In this tutorial, you'll learn about Object Oriented Programming, or OOP for short. OOP allows you to create large projects while still keeping things easy to understand.
Class and Object
The world around is made of up different types of objects - planets, cars, computers, animals, and so on. In OOP, a type of object is represented by a class. Specific planets - such as Earth, Mars, Jupiter, etc and specific cars such as your car, my car, and the taxi driving by outside your house are each represented by an object.
In programming, a class is a programmer-defined data-type. A class contains some data, and methods / functions to use that data.
Let's look at how to define a class. First we have to define a PHP class, where the name of the class should be (preferabl...
Previously in the course, you learnt about forms in PHP: Superglobals and Forms. In this tutorial you are going to learn about (a) how to make sure your website remains safe and secure from hackers when you accept form input and (b) how to provide a user helpful messages when they fill a form incorrectly.