Skip to content

PHP Tutorial Getting Started with PHP

What Can PHP Do?

Lesson 2 of 369 2 min read By Deepak Paswan Updated Oct 5, 2026

PHP can do anything a web server needs to do. Here are the jobs you will learn in this course.

Build pages that change

PHP can put the current date, a user’s name or a list of products into a page.

index.php
PHP
<?php
$name = "Asha";
echo "<h1>Welcome back, $name</h1>";
Output
OUTPUT
<h1>Welcome back, Asha</h1>

The browser receives plain HTML. The name came from PHP.

Handle forms

When someone sends a contact form, search box or sign-up form, PHP reads what they typed. You will do this in HTML Forms with PHP.

Work with databases

PHP can read and write data in databases such as MySQL. Products, posts and users usually live there. You will start in Connecting PHP to MySQL.

Manage users

PHP can keep a person logged in with sessions and check passwords safely. See How Login Systems Work.

Read and write files

PHP can read a text file, save an upload or write a log. See Opening Files.

Talk to other services

PHP can call APIs, read JSON and send JSON back. That is how a mobile app or a JavaScript front end gets data from your server. See What Is JSON?.

What PHP does not do

PHP does not run in the browser, so it cannot react to a click or a mouse move by itself. For that you use JavaScript. The two work together, and the next lesson explains the split.

lightbulb
Do not worry about the long list
You will not learn all of this at once. Each chapter adds one skill, and every skill builds on the one before it.