Introduction to PHP

What is PHP ?

phpThe beauty of PHP as a language is that it is designed to be used along with HTML. You can use PHP right inside your already existing HTML content, or put HTML tags right inside your PHP coding.

When learning PHP you are not making your existing HTML knowledge obsolete, you are instead adding to it to give it more functions and abilities. PHP is a scripting language that is often embedded into HTML to add functions HTML alone can’t do.

  • PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.
  • PHP is a powerful tool for making dynamic and interactive Web pages.
  • PHP is a server-side scripting language
  • PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
  • PHP is an open source software
  • The goal of the language is to allow web developers to write dynamically generated pages quickly.

PHP stands for PHP: Hypertext Preprocessor, which gives you a good idea of its core purpose: to process information and produce hypertext (HTML) as a result.

What it can do?

The interesting stuff happens when a PHP script runs. Because PHP is so flexible, a PHP script can carry out any number of interesting tasks, such as:

  • Collect and process form data.
  • Generate dynamic page content.
  •  Send and receive cookies.
  • Reading, writing, and creating files on the Web server.
  • Working with data in a database stored on the Web server.
  • Grabbing and processing data from other Web sites and feeds.
  • Generating dynamic graphics, such as charts and manipulated photos.
PHP vs HTML (Difference)

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.

php1

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

php2As per the client side browser it does not understand PHP or any other language. It can understand HTML, JavaScript, CSS etc.

What Do I Need To Get Started?

You must have the following installed on your computer in order to begin.

  • Apache
  • MySQL
  • Web Browser
  • Text Editor
  • PHP
Why Should I Use PHP?

HTML is 100% static. By implementing PHP into your code, we can create dynamic sites that will change dependent upon specified conditions. With a community base second to none, this open-source language has proven itself over the years to be one of the best options for dynamic web applications.

History

When the prototype of PHP was originally devised in 1994 by Rasmus Lerdorf, it was given the working title of Personal Home Page Tools. Rasmus later combined Personal Home Page Tools with another application he had written (Form Interpreter, or FI) to create PHP/FI. This system grew at an amazing pace and although the name PHP stuck, the original meaning became less and less relevant. Eventually PHP was rewritten and repackaged with the name ‘PHP: Hypertext Preprocessor’. Most people ignore that, however, and simply refer to it as PHP.

Some good PHP tutorials

This was a basic introduction to PHP to get to know the PHP from outside. If you are interested in learning in PHP and are seeking for some good online tutorial then I am mentioning a list ,which according to my experience are a good place to learn PHP at basic and intermediate level.

  • www.w3schools.com (Easy to grasp and basics are covered)
  • www.tizag.com/phpT (Nice arranged tutorial for basics)
  • www.net.tutsplus.com (Good tutorial with live examples)
  • www.pickatutorial.com/tutorial/phpmysql (Simple and clean tutorial)
  • www.php.net/manual/en/index.php (Complete reference with advanced features included)
5 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *