Category: PHP

  • What is SQL Injection and how to fix it

    1. Introduction In this article, we learn about SQL injection security vulnerability in web application. We see an example of SQL Injection, learn in in-depth how it works, and see how we can fix this vulnerability. We use PHP and MySQL for the examples. The SQL injection is the top exploit used by hackers and…

  • Running PHP Unikernels on Google Cloud

    1. Introduction Setting up and managing our own servers can take a considerable amount of time especially if we are not a day to day linux user. That is why we see things like serverless and containers catching on. There’s another option out there though too and it’s called unikernels. What are unikernels though? Unikernels…

  • Implementing Two-Factor Authentication in Laravel Applications

    1. Introduction Two-factor Authentication, also known as 2FA is a type, or subset, of Multi-factor Authentication. Multi-factor authentication is a method of confirming identity using by combination of two or more claimed identities. 2FA is a method of confirming users’ claimed identities by using a combination any two different factors from below: something they know…

  • Understanding the SOLID principles of software engineering

    1. Introduction Software engineering is a combination of art and science. In this article, we will understand the most basic and essential software design principle: SOLID, which is an acronym for five different principles given by Robert C. Martin. He is famously known as Uncle Bob. Software designed using these principles is easily extensible, maintainable,…

  • Create a composer package and list on packagist

    1. Introduction In software engineering and development, things change very quickly. We need to move forward and keep ourselves and our code up to date. Software development mostly revolves around code re-use because there is no point in writing login-signup again and again. There are ways to share our code with others and to use…

  • Handling PHP Errors and Exceptions

    1. Introduction In this article in this series will learn how we can handle errors and exceptions that occur when our PHP code is executed. We will learn about different types of errors and exceptions in PHP, how we can use built-in functions related to exception handling and how we can write custom error handler…

  • Databases and working with MySQL

    1. Introduction In this article, we are learning about databases and how we can connect to databases using PHP programs. Databases are used as information storage components in software systems. We can connect to databases using different technologies and programming language. Let’s first understand the concept of databases thoroughly and then we will connect to…

  • PHP, HTTP, and the web

    1. Introduction The majority of our web works on a client-server model which is governed by the HTTP protocol. In this article, we are having an introductory look on HTTP protocol and different capabilities of PHP related to HTTP. Also, we are exploring some of the most useful and essential functions in PHP to create…

  • Looping around in PHP

    1. Introduction In this article in the series, we are learning about different types of loops. Loops are programming constructs that can be used to repeat a particular task, or in other words, we can say loops are used to execute the same block of code again and again by some pre-defined conditions. The primary…

  • Fun with conditional logic

    1. Introduction In this article, we are learning about the different programming constructs that can help us in implementing conditions and to branch the execution of our programs logically. We will learn about if-else construct, switch statements and ternary operator. Let’s go through them. 2. if-else statements The if statement tests if a particular condition…