New Document
Introduction to Php

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. The difference between a static page like HTML and dynamic page like PHP is the way the server interpret the request.


The goal of this tutorial is to teach you the basics of PHP so that you can:

  • Customize PHP scripts that you download, so that they better fit your needs.

  • Begin to understand the working model of PHP, so you may begin to design your own PHP projects.

  • Give you a solid base in PHP, so as to make you more valuable in the eyes of future employers.

  • PHP stands for PHP Hypertext Preprocessor.

PHP - What is it?
  • Taken directly from PHP's home, PHP.net, "PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly."

    This is generally a good definition of PHP. However, it does contain a lot of terms you may not be used to. Another way to think of PHP is a powerful, behind the scenes scripting language that your visitors won't see!

    When someone visits your PHP webpage, your web server processes the PHP code. It then sees which parts it needs to show to visitors(content and pictures) and hides the other stuff(file operations, math calculations, etc.) then translates your PHP into HTML. After the translation into HTML, it sends the webpage to your visitor's web browser.

What can I do with PHP?
PHP, as we told earlier, is a server-side scripting language. The client will always see and interact with HTML in his browser. PHP is capable of generating dynamic HTML pages and hence it can output HTML which servers as a presentation layer and in the backend, on the server it can continue to process all requests made by the client. These requests could be processing of form, handling cookies, uploading files, generating dynamic HTML by querying a database etc.
PHP can also be used from command line to execute php scripts. This is similar to running a UNIX shell or a perl script from command to accomplish tasks like taking backup of files, analyzing log files, generating a list of files and folders etc.
PHP is capable of doing much more than what read above. You can use it on command line interface to do most of the tasks stated above, without a browser, of course. PHP can also be used to create rich GUI applications using PHP-GTK kit. This requires knowledge of advanced PHP features.
PHP - What's it do?

Five important characteristics make PHP's practical nature possible:

  • It is also helpful to think of PHP in terms of what it can do for you. PHP will allow you to:
    Reduce the time to create large websites.
    Create a customized user experience for visitors based on information that you have gathered from them.
    Open up thousands of possibilities for online tools. Check out PHP - HotScripts for examples of the great things that are possible with PHP.
    Allow creation of shopping carts for e-commerce websites.

What You Should Know

Before starting this tutorial it is important that you have a basic understanding and experience in the following: HTML - Know the syntax and especially HTML Forms. Basic programming knowledge - This isn't required, but if you have any traditional programming experience it will make learning PHP a great deal easier.

                                                                                                                                                       Next

Back to Top