How To Use PHP (Hypertext Preprocessor)

Beginner's Guide to PHP

PHP (Hypertext Preprocessor) is a web development language, where you can develop and create small and big databases/applications with the help of MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc. PHP is a server side-scripting language like ASP. Learning PHP (Hypertext Preprocessor) can be fun and challenging. It is not that complicated but requires close attention. Here we will introduce only PHP and MySQL databases.

  1. What is PHP?: PHP stands for (Hypertext Preprocessor) but in the past it was abbreviated as (Personal Home Page). PHP interacts with HTML and is used inside HTML tags. PHP scripts are executed on the server and the result is shown on the browser to the user. A PHP file may contain text, scripts or HTML tags and the PHP files have the extension of ".php" ".php3" ".phtml."
  2. What is MySQL?: SQL is a database server and is ideal for both large and small applications. MySQL supports standard SQL and MySQL compiles on a number of platforms.
  3. How to start using PHP.: Before you code, you should install some software & programs to make the environment suitable for using PHP:
    • Install Apache Server on Windows or Linux machine
    • Install PHP on Windows or Linux Machine
    • Install MySQL on Windows or Linux Machine
  4. Basic PHP syntax: A PHP scripting block always starts with <?php and ends with ?>. A PHP scripting block can be placed anywhere in the document. If shorthand is supported on the server, you can start a scripting block with <? and end with ?>. However, for maximum compatibility, I recommend that you use the standard form (<?php) rather than the shorthand form.
  5. Creating first program with PHP: Open Notepad or any text editor that best suits you and write the following block of code:
    • <Html><head><title> My First PHP Programming</title></head>
    • <Body>
    • <?php
    • echo "Hello!! How To Do Things Readers"; //echo function prints text string on the screen
    • ?>
    • </body></html>
    • Save the file with "myprogramm.php" and run on your computer through Apache Server.

You won't be able to see the source on selecting "View Source" from the browser, because all the scripts are executed on the server. The results will only be shown on the user browser.


Share this article!

Follow us!

Find more helpful articles:



Nice article. PHP is what i used when programming for server side.

By Pasca Maulana

Thanks for the good info on PHP, would love to have more of your articles on this.

By Waheedullah Aleko

Keep on writing on these topics. It helps me understand all the new language.

By Mary Norton