Core PHP

Part 1:-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 and easy to learn.


Part 2:-Variable Declaration in PHP

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


Example Sheet

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


Part 3:-If-else in php

In the earlier example we calculated the hra and gross salary.


Part 4:-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.


Part 5:-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.

Suppose I have following screen


Part 6:-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.