Learning PHP is not incredibly hard, but yet it is not something someone can do by trial and error. This set of articles will go through some basic tutorials for using PHP to create a web page, but most users will want to invest in a book on PHP such as PHP and MySQL for Dummies by Janet Valade. This and many other excellent PHP tutorial books help guide a beginner through the steps in much more depth than this article will be able to cover, but even so this tutorial will give you a quick and dirty example of how PHP code creates dynamic results. Here are some things to consider before attempting to write your first PHP based web page.
Common Problems Of Beginner PHP Coders
Common Problems Of Beginner PHP Coders
First, it is important to note that PHP code is a server side language. This means that the code you write is processed on the web server before being sent out to the Internet. As such, any web pages you write using PHP must be uploaded to a web server and called from a web browser. Simple opening the file in a web browser while it is still sitting on your home computer will not execute the PHP code.
Second, like all programming languages PHP is very picky about certain things. One of the biggies is that each statement to be executed in the code must be terminated by a semi-colon (;). Leaving out a semi-colon or other character may result in an error message announcing a "parse error." If you see this error when attempting to open the new page it is a sure sign that you have left out a special character. Luckily PHP tries to help you fix the problem by stating a line number where the error occured. For this reason it is a good idea to use a text editor that displays line numbers as you work. One highly recommended free text editor for this purpose is known as PSPad. PSPad is excellent in that it not only displays line numbers but it also helps detect missing characters and coding problems while you work.















