PHP Introduction: What is PHP ?

PHP with Webserver and database
"PHP: Hypertext Preprocessor"

PHP is a server side scripting language, widely used in internet programming. We can develop pages with dynamic content by using PHP. By using PHP we can interact with database servers and manage the page content accordingly.

Introduction to PHP and XAMPP web server

Some important points about PHP

  • PHP runs at Web server side.
  • Your web browser at client end can’t execute PHP code.
  • PHP script handles database and manages records at server end.
  • Our PHP script at server end contains PHP code and other client side codes. After execution of PHP code, the output is posted to client side. These outputs will contain HTML , JavaScript and style codes.

What we can do by using Php?

  • Create member signup , login pages and store the details as records in a database.
  • Create shopping cart for an e-commerce site
  • Manage content of a website.
  • Create a discussion forum.
  • Create dynamic graphs and images, draw charts.
  • It is free and open source
  • PHP can run in many platforms like Linux , Windows , Max , Unix etc
  • Works well with all Web server like Apache, IIS etc
  • It can connect to many databases ( MSSQL, Oracle, MySQL etc )
Download PHP Here

Let us take one simple example.

Simple codes of Beginners

Server request for static html page by client


Installation Description
IIS7 ConfigurationAdding Modules, php5 dll
InstallationPHP5 on IIS7 server with setup Wizard
InstallationPHP5 on windees server and IIS
InstallationPHP on windees server and IIS
InstallationPHP5 on IIS7 server with setup Wizard
HostingPHP hosting server
You can read more on Installation of PHP here

PHP support and system

Function Description
phpinfo()List of settings and configuration about PHP support
php_uname()About server , OS , Host name, Machine type, version name
php_ini()Server configuration file edit and update
ini_get()Reading about the PHP settings of php.ini file settings
ini_set()Changing ( some of the ) PHP settings at page level
php_ini_loaded_file()Path of loaded php.ini file
PHP_VERSION()What is the version of PHP the system is using
Extension PHPExtension directory of PHP to store dll files for windows
Header RedirectRedirection of page using header

Basic Code

Function Description
Guide PHP beginners guide
echo()Printing output using PHP
sleep()Adding delay to script execution
CommentsAdding text to part of php code for better understanding and maintenance
NumbersPrinting numbers to screen using loop
includeInclude file with main file
ErrorsHandling PHP errors during code execution
print()Displaying output in PHP
Sample codeSimple scripts in php for beginners
When ever request comes for a static html or htm page the web server returns the page to the client. Here script processing or execution is not done. Such pages don't have dynamic capability and content is fixed. In Windows server the web server is IIS and for Linux systems Apache web servers are generally used. However PHP and Apache runs well in Windows platform also. This site is supporting PHP on a Linux platform. In the same way the server can run other scripts like ASP, Perl etc. PHP can be downloaded from

Incase of PHP pages the server does not return the page directly to the client. The web server runs the PHP engine and the output of the executed script is posted back to the client machine.  Depending on the various input conditions the page content can be changed. PHP can easily connect to MySQL database and this combination is very popular in the internet
As per the client side browser it does not understand PHP or any other language. It can understand HTML, JavaScript, CSS etc.

The file extensions for PHP pages.
Web sites are organized at the server like we organize files and folders. So when we open a website one of the default file opens as home page of the site. Read here on how to fix the default page of a website . Usually files with php or php3 ( in old version of PHP ) extensions are files which contain PHP code. Same way we can say the files with .asp are the active server page files contains asp code. But this is not always true. At the server settings we can change the settings and tell the web server which type of files to execute through which engine or scripting language. A file with .htm extension can pass through php engine to execute php codes present inside. Read how IIS is set to pass different extensions through different engines.

However after executing different types engines the final script is posted to user browser which does not contain any PHP, ASP or any other types of scripting language and it only contains HTML and other client side scripts.

Answer these questions..
  1. By using PHP can we manage the layout of a web page ?
  2. Without installing PHP at the server can we execute a php file with php code inside ?
  3. Does the file extension matter ( by default without changing the settings ) at server end for executing scripts.
  4. Can I develop a member login script by using HTML

First PHP code displaying phpinfo() , Hello Word using localhost

basic questions on PHP

Guide to installation and How to write our first PHP Script Simple codes of Beginners

Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net



    i want the complete tutorial of PHP.


    i would like to learn full php so i want the complete php tutorial


    Would like to learn php,so i want the full tutorial and how to configure it.


    can we have a video php tutorial


    i want some sample project with clear coding in only php.


    what'sthe answer
    Md Sadique


    I want complete PHP scripts.


    i want whole php interview question ans and tutorial with demo


    I need simple add save and delete code
    Prashant Patil


    want some sample project with clear coding in only php.


    i want to know php with mysql tutorials and also about how to create a table in mysql
    Krishna Kumar


    i really say thanks it helps more to php new learners


    Great stuff:)


    how do I set up the server to accept php uploaded files?


    Can you briefly explain what is php

    Post your comments , suggestion , error , requirements etc here

    PHP video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer