Category: PHP Tutorial

python tutorials and learn python

Created with Sketch.

PHP File Exists

PHP File Exists Summary: in this tutorial, you will learn how to check if a file exists in PHP using the file_exists(), is_file(), is_readable(), and is_writable() functions. PHP provides some useful functions that allow you to check if a file exists. Let’s examine these functions and how to use them effectively. Check if a file…
Read more

PHP Open File

PHP Open File Summary: in this tutorial, you will learn how to open a file in PHP using the fopen() function. Introduction to the PHP fopen() function Before reading from or writing to a file, you need to open it. To open a file, you use the fopen() function as follows: fopen ( string $filename…
Read more

PHP Remember Me

PHP Remember Me Summary: in this tutorial, you’ll learn to securely implement the remember me feature in PHP. Introduction to the PHP remember me feature When users log in to a web application and then close web browsers, the session cookies associated with the logins expire immediately. It means that if the users access the…
Read more

PHP Email Verification

PHP Email Verification Summary: in this tutorial, you’ll learn how to verify the new account’s email address securely using an activation link. Introduction to the PHP email verification for new accounts In previous tutorials, you learned how to create a registration form that allows users to register for accounts. And you also learned how to…
Read more

PHP Login

PHP Login Summary: in this tutorial, you’ll learn how to create a login form using a username and password. Prerequisites To start this tutorial, you need to complete the previous tutorial that creates a registration form. Introduction to the PHP login form In the previous tutorial, you learned how to create a form that allows…
Read more

PHP Registration Form

PHP Registration Form Summary: in this tutorial, you’ll learn how to create a PHP registration form from scratch. Introduction to PHP registration form In this tutorial, you’ll create a user registration form that consists of the following input fields: Username Email Password Password confirmation Agreement checkbox Register button When a user fills out the form…
Read more

PHP password_verify

PHP password_verify Summary: in this tutorial, you’ll learn to use the PHP password_verify() function to check if a password matches a hashed password. Introduction to the PHP password_verify() function When dealing with passwords, you should never store them in the database as plain text. And you should always hash the passwords using a secure one-way…
Read more

PHP password_hash

PHP password_hash Summary: in this tutorial, you’ll learn how to use the PHP password_hash() function to create a password hash. Introduction to the PHP password_hash() function The password_hash() function allows you to create a password hash using a secure one-way hashing algorithm. Here’s the syntax of the password_hash() function: password_hash(string $password, string|int|null $algo, array $options…
Read more

PHP filter

PHP filter Summary: in this tutorial, you’ll learn to define a PHP filter() function that sanitizes and validates data. Define PHP filter() function In the previous tutorials, you learned how to define the sanitize() and validate() functions to sanitize and validate data. The sanitize() function sanitizes data based on specified filters and returns an array…
Read more

PHP Sanitize Input

PHP Sanitize Input Summary: in this tutorial, you’ll learn to develop a reusable PHP sanitize() function to sanitize inputs. Introduction to sanitizing input Before processing data from untrusted sources such as HTTP post or get request, you should always sanitize it first. Sanitizing input means removing illegal characters using deleting, replacing, encoding, or escaping techniques.…
Read more