16-07-2012, 12:33 PM
PHP Syntax
PHP.doc (Size: 623 KB / Downloads: 27)
Definition of Terms
PHP: Hypertext Preprocessor is a scripting language that is embedded in HTML. PHP scripting code is frequently used to connect web pages to MySQL databases to create dynamic web sites. Some popular examples of PHP driven web sites would be blogs, message boards, and Wikis. PHP files are actually plain text files; they can be created in TextPad or any other Plain Text Editor. In a text editor set the Save As type to text and save the file with a .php extension. Note: You must type the .php yourself. PHP files can also be created with Dreamweaver MX 2004. PHP is "open source" and therefore free. We use the Apache Server to work with PHP files in the classroom.
MySQL is a relational database system. MySQL uses "Structured Query Language" which is the most common database language. It is the most popular "open source" database in the World. MySQL content can be managed via a command line or a web interface. MySQL is "open source" and therefore free. We use the Apache Server to work with MySQL files in the classroom.
Coldfusion is another scripting language used to connect to databases. It performs essentially the same functions as PHP, but it is produced by Macromedia. There is a free developer edition of Coldfusion available on Macromedia's web site. We use the Apache Server to work with Coldfusion files in the classroom.
phpMyAdmin is a popular PHP driven web interface that allows you to manage your MySQL database content via a web form. It is much easier to learn to use phpMyAdmin to manage your MySQL database content than it is to edit it from the command line. phpMyAdmin is "open source" and therefore free.
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.
On servers with shorthand support enabled you can start a scripting block with <? and end with ?>.
For maximum compatibility, we recommend that you use the standard form (<?php) rather than the shorthand form.