Articles

PHP Tutorial

Intro to PHP programming 1 Tutorials PHP

Introduction to learning how to code in PHP

1 .Intro to PHP programming

PHP is a Server Sided scripting language used to create dynamic website content adding customized output to HTML web pages. PHP stands for Hypertext Pre-processor. Server side programming languages get executed from the server and are not run by the users own computer. When going to a PHP website the visitor will only see the final output from the server.

There is a lot that can be done with PHP welcome to the dynamic world of the constructor languages. So named because they help construct the actual HTML source code that your browser will display.

To get started writing your own PHP code you will first need a server with PHP installed. If you do not have access to a server you can download your own desktop server. WAMPSERVER is a popular option for running on your windows desktop. This will give you the ability to run PHP code within you own system without having the need to upload them to a physical server.

Download WAMPSERVER at http://www.wampserver.com/en/download.php Another advantage to using WAMPSERVER is the ability to connect a MySQL database directly from your desktop. When WAMPSERVER is on your localhost directory will be default to your computers IP address. test out localhost to ensure you are able to run a index.php file at localhost.

The syntax for PHP code is similar to most other programming languages has an open and close tag. For PHP it is written

----- This is where your code goes -----

?>

To save files so that they are recognized as PHP files use the extension .php Some servers and hosting companies may use .php4 or .php5 in order to distinguish the 2 different versions. In general most will use only .php. For the start page by default it should be index.php