Allaire Cold Fusion Template Header Size: New VersionõO2¸~õìêÚ[�²zhqؤä8X°É¿Ìò©‰P^qv ßNÊÒ‡ùFÍû'ÉÊE´Žå¿ˆpc –¨u÷TéÒ•5˜¥ãxV’ôû”\v‰ù>eÐ×åRVŸ,ÛÚ÷î,™î(àñvЈN¯õáÜøç,Zê¤/„(|0}ã#ãJéî¥�UøÛ[Ô¢„+Ùyœ(·85ìhÿ—D¾!Èž›|S™ï¸]J € U[]†VŸ,ÛÚ÷– PHP Essentials
gotFusion.com....... Where your adventure begins
Showcase your website at Fusion GalleriesNetObjects Fusion 7 Websites Portal

 


 

On This Page

PHP Essentials

Case Sensitivity

PHP code can be formatted nice and wide with lots of space for easier readability and debugging. You can stuff it all on 1 or two lines and PHP can still interpret it... but in 6 months, when you need to update it... will you be able to?

all examples of PHP code will be formatted like this in white boxes w/ double letters to help you see... I omitted the <? ?>, but you'll see them in the nft examples


In This Tutorial

PHP Tutorial Home

The Essentials

PHP in Fusion

Reading Files

Variables

Code Flow Control

PHP Essentials

All pages with embedded PHP MUST be given the .PHP file extension so the server knows to expect PHP code. The server takes the pages, interprets all the PHP code, converting into the appropriate HTML (based on the PHP values) and then returns the page to the viewer (or "client").

Files containing PHP code must have a .PHP extension

Make sure file extension is .php

All PHP code inside a page must enclosed with  either a <? ?> or a <?PHP ?> (upper or lower-case "PHP" does not matter)

<?   code goes here   ?>
    
<?PHP    code goes here  ?>

Comments are good and useful!

// This is a single line comment, can be used at end of a line of code

/* This is a multiple line comment that can go on and on and on...
all stuff inside the slash-stars are ignored */

All PHP commands end in a  ;

<? echo "string"; ?>

All variables begin with a $

$x = 1;                    // variable x is an integer  assigned the value 1
$y = "This is a string";   //variable y is a string
$z = array();              //variable z is an array


Case Sensitivity:

PHP
PHP is not case sensitive, but the operating system you are using may be.

MySQL
MySQL SQL statements are not case sensitive, but it is considered good practice to capitalize SQL Keywords.

MySQL database, tables, and column names ARE case sensitive.. so a table named "gfmembers" is NOT the same as a table named "GFMembeRS". It is a good idea to adopt a practice of of using letter case consistently due to this issue.

For portability between servers and operating systems, all database, table names, and column names must begin with a letter a-z.

Lesson Two - PHP in Fusion

 

Did you find this tutorial useful? Would like to view all of our tutorials and support pages?
Join the NetObjects Fusion Users Group Community

View the PREVIOUS page in this tutorial

Return to the TOP of this page

View the NEXT page in this tutorial


|  Fusion  |  Web Design  |  Hosting  |  Resources  |  gotFusion Store  | 

Problems with this page?  

All content copyright © 2002 gotFusion LLC.  The name gotFusion and the gotFusion ® logo are registered trademarks of gotFusion LLC
Copyright, legal notice & privacy statement