Contact Form Processing Products - for all your needs

FormMail • Form Encryption • Hosted Forms

Learn About PHP

PHP Tutorial

This online tutorial will help you learn about PHP. It will answer questions you might have such as:

  • What is PHP?
  • What's the relationship between PHP and HTML?
  • Do I need to learn PHP?

What is PHP?

PHP is a scripting language that programmers can use to instruct a computer to perform various functions.

PHP is mostly used on web servers to help construct web pages.

Most pages on our web site, including the page you're reading now, are generated using PHP.

PHP and HTML

How can you tell?

Web pages usually have an extension at the end of their name. In most cases, HTML pages have ".html" or ".htm" as their extension.

In contrast, PHP-generated web pages usually have ".php" as their extension.

What else is PHP used for?

Repetition is one reason, but a more important reason is that PHP can perform logical operations, calculations, databaseOpens in a new window operations, web connections, and so on.

PHP is a full programming language, allowing web designers to create powerful, feature-rich and complex web sites more easily.

Web pages that use PHP are still normal web pages whose content is described in HTML. In fact, your browser works exactly the same whether you're viewing a page written HTML or in PHP. This is because the output of PHP code is HTML code.

It's important to note that PHP is used to generate HTML pages. Your browser behaves exactly the same whether a web page has ".html" or ".php"

So why is PHP used?

Web sites have a lot of repetition. For example, the header and footer on every page of a web site is usually the same. Also, navigation menus are generally identical on every page.

Actually repeating the HTML code on every page creates a maintenance problem. Imagine if you wanted to update the copyright message on a web site that had 100 pages. Would you want to visit each page and make 100 identical changes?

Computers are very good at doing repetitive tasks. So, for complex web sites, many web designers choose to use a scripting language such as PHP to reduce the repetition.

In the copyright message example, a PHP page can simply include the copyright message from a single file stored on the server. The web site owner then just needs to make the one change in that single file in order to change the copyright message you see on every page of his web site.

PHP and Forms Processing

When a web form is submitted to a server processing must be performed to do something with the data submitted.

This processing requires decisions (logic), computations (calculations), and various other operations. For this reason, a programming language must be used to accept a form submission.

PHP is very good choice for writing a forms processor because it has been designed from the beginning as a computer language to be used on the web.

Do I need to learn PHP?

The short answer is "no". PHP is a full programming language and is really only designed for use by qualified programmers.

The web is full of example PHP scripts that you can copy and paste, and this can make it seem very simple to use. In many cases, copying and pasting PHP code is fine if you have a good understanding of what you're doing.

However, computer programming is a very complex task and this means it's easy to get things wrong or create security problems.

You'll be aware of all the security problems for which large software companies are continually providing "patches" or updates. These companies can afford to hire the best programmers with years of experience (though, for some strange reason they don't seem to hire the best or most experienced!) and these programmers still fail to create secure and reliable software.

So, programming is best left to the true professionals, and you're best to find the ones with a proven track record of creating secure and reliable software.

What should I do?

Is it really that hard?

Note that tens of thousands of web site owners (who are not programmers or PHP experts) have downloaded and configured Tectite FormMail since 2003.

By carefully following the instructions and looking at the examples, almost anyone can configure a pre-written PHP script such as Tectite FormMail.

However, as a web site owner, we do recommend that you become familiar with reading PHP code.

Like most programming languages, PHP is quite easy to understand with some basic training. (Note that understanding code is 1000 times easier than writing code.)

You'll often need to make minor changes to PHP scripts you use. If you download and configure our FormMail product, you'll be making manual changes to its configuration section.

You can do this easily with any text editor, but you will need to have some basic understanding of reading a computer language such as PHP.

If you don't want to even look at PHP code, then the best solution is to use our Configuration Wizard. For basic operation, it provides you with working PHP code (and HTML forms) without you having to even look at the PHP code.

 
Close