The following article discusses When should we prefer to React over PHP. In fact, React and PHP are two different technologies with different use cases, so it’s not really a matter of “preference” between them. As a matter of fact, React is a JavaScript library. We use it to create elegant and complex user interfaces. …
Exploring PHP Arrays: Tips and Tricks
The following article on Exploring PHP Arrays, describes the arrays in PHP with examples. Introduction: Brief overview of arrays in PHP Importance of arrays in programming Purpose of the post: tips and tricks for working with arrays in PHP Section 1: Creating Arrays Different ways to create arrays in PHP (e.g., array() function, square bracket …
Most Frequently Asked PHP Interview Questions
When you decide about making your career in PHP development you must go through the following Most Frequently Asked PHP Interview Questions. Simple PHP Interview Questions What is the latest version of PHP? How will you display text on a web page using PHP? Discuss three different ways. When will you use the switch case …
Deleting Multiple Records with mysqli in PHP Using Form Input
Today I will discuss an example of Deleting Multiple Records with mysqli in PHP Using Form Input. Suppose we have a database table and we want to allow the user to delete some or all of the records. Since user will access the application through a web interface, the delete option should be available on …
Features and Benefits of PHP Data Objects and How to Use
In this article, I will discuss the Features and Benefits of PHP Data Objects and how to use it with a MySQL database. In fact, PDO is an API that we can use to access a database. Unlike MySQLi, we can use PDO with a number of databases. For instance, PDO supports MySQL, MS SQL …
Working with phpMyAdmin – Creating Users and Assigning Privileges
In this article on Working with phpMyAdmin – Creating Users and Assigning Privileges, I will explain how to create a user for a database and how to assign privileges to that user. Also developed in PHP, phpMyAdmin is a tool that allows the users to manage MySQL database. Basically, it is a free software tool …
MySQLi Prepared Statement and its Benefits
Today I will discuss MySQLi Prepared Statement and its Benefits. Prepared statements provide a better way to execute SQL queries. Apart from being safe, the prepared statements allow the reusability of code. Since the statement need to be prepared once and can be executed any number of times by just replacing the parameters, these statements …
Examples of Database Connectivity Using MySQLi in PHP
This article presents Database Connectivity Using MySQLi in PHP. Create a database with the ‘CREATE DATABASE’ command using a PHP program. (https://www.programmingempire.com/creating-a-database-with-mysqli/) How to create a database table in a MySQL database? (https://www.programmingempire.com/example-of-creating-a-mysql-database-table-using-php/) Insert Records Using HTML Form in a Database Table (https://www.programmingempire.com/inserting-a-record-in-a-database-table-using-mysqli-in-php/) Using Prepared Statement in PHP to insert a record. (https://www.programmingempire.com/inserting-record-using-prepared-statement-in-php/) How to …
Types of Errors in PHP and How to Handle Them
In this article, I am going to discuss the Types of Errors in PHP and How to Handle Them. There are four types of errors that a PHP Script can generate. Syntax errors or compile errors Runtime errors or fatal errors Warnings Notice Errors Syntax Errors (Compile Errors) Syntax errors are those errors that the …
Working With Directories in PHP
Working With Directories in PHP involves creating a directory, changing directories, listing the content of a directory, and also deleting a directory. PHP provides several in-built functions that enable us to perform operations on directories. The following section discusses some of these functions. Functions for Working With Directories in PHP To begin with, we create …