PHP Tutorials

Newest First
Oldest First
Highest Rated
Most Popular
Random
How to Validate and Sanitise PHP Form Input for Security

Learn how to secure your PHP forms by validating and sanitising user input. This tutorial covers techniques to prevent SQL injection, XSS attacks, and ensure reliable data handling.

By AI

PHP Object-Oriented Programming (OOP) Basics

PHP OOP organizes code with classes and objects, enabling reusable and scalable applications.

By DanielXP

PHP Error Handling

Learn to handle PHP errors effectively with reporting, custom handlers, and exceptions for robust applications

By AI

PHP Basics

This beginner's PHP tutorial covers essential concepts, including setting up a PHP environment, basic syntax, variables, data types, operators, control structures, functions, arrays, superglobals, and file handling. It's a practical guide for new developers to start building dynamic web applications with PHP.

By AI

[PHP IRC] Place item, get new random.

Adds a simple game to the bot :)

By ShadowMage

[PHP IRC] Bot authentication

Authenticate with the bot before allowing access to commands,

By ShadowMage

PHP IRC Bot

Connect to the network.

By ShadowMage

Basic File Upload System

Allow users to upload files to your website

By Dava

Constants

IDs for Values

By ilyas-shezad

Parsing a RSS feed

How to parse a RSS feed in PHP.

By DanielXP

How to use functions

What, how, where, when and why?

By ilyas-shezad

Guest Statistics

Shows Guest's IP and Browser

By ilyas-shezad

Ajax Chat

Instant and more interactive

By ilyas-shezad

PHP Switch

A easy code for a navigation

By Adam981

Make your own function

Making functions is easy, you should try it

By Jackboy

Reading INI files with PHP

Read ini files with PHP!

By Diablosblizz

Validating Credit Cards

Validating Credit Cards quite advance. but you will get it.

By cyruswu

Create a Simple PHP Contact Us Form

Learn how to create a PHP Contact Us form with input validation and email functionality. This step-by-step guide ensures your form is easy to use and integrates seamlessly with your website.

By Liquidsteel

Creating A MySQL and PHP Registration Script

making a registration script and one other script to connect to the database.

By ilyas-shezad

Random banner

Pick random banners

By ilyas-shezad

Count Spots

Like we used for our birthday competition.

By DanielXP

Updating Copyright

Make an updating copyright.

By cyruswu

RSS Feed

Simple :)

By ShadowMage

How to Use PHP GD to write Text

Simple script to write using GD

By gbt91

[GD]Create An Image With Text

Multiple Files used :P

By ShadowMage

Show Server Status

Show Port Stats for your server

By James

Random Ads

Show Your Ads with a simple script that randomly picks it

By gbt91

Browser Detection in PHP: Identify Chrome, Firefox, Safari, and More

Learn how to detect popular browsers like Chrome, Firefox, Safari, Edge, and Internet Explorer using PHP. This tutorial provides a robust script for identifying user agents and tailoring your website's experience to specific browsers.

By Diablosblizz

Formatting Dates and Times in PHP: A Beginner's Guide

Learn how to use PHP to display and format dates and times effortlessly. This tutorial covers practical examples and formatting codes

By ShadowMage

If, else and elseif

Learn about these 3 funtions.

By DanielXP

PHP Cookies

Learn how to use cookies to store information in PHP.

By DanielXP

PHP explode() Function: Splitting Strings Made Easy

Learn how to use the PHP explode() function to split strings into arrays with a specified delimiter. This tutorial covers practical examples, including parsing dates and assigning split values to variables.

By DanielXP

PHP's wordwrap() Function to Handle Long Text

Learn how to use PHP's wordwrap() function to neatly break long strings into smaller, readable chunks. This tutorial covers practical examples, optional parameters, and tips for managing user-generated content without breaking your website's layout.

By ShadowMage

PHP Content Filter: Replace Bad Words

Learn how to create a PHP function to filter and replace bad words from user-generated content This tutorial demonstrates how to query a list of prohibited words, and replace them dynamically for safer and cleaner content.

By DanielXP

Secure Page Switching in PHP with URL Parameters

Learn how to implement secure page switching in PHP using URL parameters. This tutorial covers using a whitelist to prevent vulnerabilities, default fallbacks, and dynamic inclusion of content pages based on user input. Perfect for creating modular and secure PHP applications.

By chrism

How to Convert Bytes to KB, MB, and More in PHP

Learn how to create a PHP function to convert bytes into kilobytes (KB), megabytes (MB), bits, or other units. This step-by-step guide includes code examples and best practices for handling data size conversions in PHP.

By chrism

How to Enable Gzip Compression in PHP for Faster Page Loads

Learn how to enable Gzip compression in PHP to optimize your website's performance. This tutorial covers setting the compression level with zlib.output_compression_level and using ob_gzhandler to reduce page size and improve load times.

By chrism

Password Protect With Cookies

Learn how to create a simple password protected page in PHP. Using cookies to keep the user logged in.

By chrism

Password Protect

Learn how to create a simple password protected page in PHP. This tutorial covers defining credentials, checking login details, and displaying protected content securely.

By kane0ner

Getting started with MySQLi

Learn how to connect to a MySQL database using mysqli in PHP. This tutorial covers database setup via cPanel and secure connection methods.

By Joshua

PHP Forms

The PHP $_GET and $_POST superglobal variables are used to retrieve information from forms such as user input.

By Joshua

PHP Server Status using fsockopen

Display server status on your website with this PHP script. Check if a server is online or offline and show custom messages based on its availability. Simple to set up and fully customizable!

By Xerofait

Online Notepad

Create an online notepad using PHP to store and retrieve text in a .txt file. This tutorial is perfect for building a simple, functional text editor for your website.

By DanielXP

Basic Calculator in PHP

Simple calculator coded in PHP

By Nyaz

Basic PHP Hit Counter

Learn how to create a basic PHP hit counter to track visits to your web page. This tutorial provides a simple step-by-step guide for implementing and displaying page view counts using PHP.

By DanielXP