What is PHP

PHP, Hypertext preprocessor or previously known as Personal Home Page is HTML Embedded server side scripting language specially build to build dynamic web pages with good performance and flexibility.

Introduction of PHP

PHP was introduced in 1995. The full form of PHP at that time was Personal Home Page. But now it is known as Hypertext Preprocessor. PHP is an Open Source. It is server side Scripting language which is embedded with HTML. PHP is generally used to develop dynamically web based application. PHP is very fast, flexible and easy to learn.

Php Introduction

Variable Declaration in PHP

In programming variable is a storage location where data will be stored. In php we declared variable using $(Dollar) symbol.

Variable declaration in PHP

Php Example Sheet

After variable, let's try some basic program in PHP.

PHP Example Sheet 1

If else in php

How to use if else in php. In the earlier example we calculated the HRA and gross salary.

If else in php

use of and-or in If-else in php

When we need to check more than one condition in if-else, then we use And and OR operator in if else.

And or in Php

Fetching data from HTML file in PHP in separate file

In this example I am going to explain how we can fetch values from our html controls in PHP file.

Fetch data from html in php

Fetching data from HTML file in PHP in Single file

In my last article I will explained how we can fetch data from html to php in separate files. In this article I am going to explain how we can fetch data from html in the same file.

Let's take the same example where we have to take two numbers from the users. Create php file and add html code to create user interface.

Fetching data from HTML file in PHP