The Structure of PHP

In 2002 <?php had been installed and hosted on 19 million internet servers. With PHP being installed on the Web Servers instead of the viewer’s computers, it is accessible to most Mac and PC users. PHP is embedded within HTML codes allowing the creator to move between HTML and PHP codes instead of using large extensive coding. This allows the creator the ability to; in a HTML page develop the graphical look of the website while using PHP to code the create the interactive features. When a page is requested that contains PHP, the processor translates and executes all the commands in the page, and then outputs the result to the browser as regular HTML. This allows developers the ability to hide their coding, as when a user goes to view the source within the Internet, it will just reveal the HTML and not the extensive PHP coding. The PHP coding includes tags like <?include(“include/….)?>  which calls for different sections of website, allowing larger and smaller sections of the website to be split down to help in the development of the coding. This is similar to a CSS Stylesheet, however unlike CSS, the coding is written in HTML.  For example if a footer is required, the <?include/….)?> coding would be

?><div align=”center” id=”footer” style=”font-family:Arial, Helvetica, sans-serif; font-size:10px;”> 
<p style=”color:#666666; padding-top:8px;”>
                                All content © 2002-06 <a href=”; mce_href=””>Marc Taylor</a> |                                <a href=”index.php” mce_href=”index.php”>Home</a> |                               
<a href=”about.php” mce_href=”about.php”>About</a> |
                                <a href=”contact.php” mce_href=”contact.php”>Contact</a> |                               
<a href=”index.xml” mce_href=”index.xml”><img src=”/template/images/rss.gif” mce_src=”/template/images/rss.gif” alt=”RSS” style=”border:none;” /></a>

<?PHP has similar coding tags as Actionscript in the sense that it uses variable tags e.g. 
if (isset($_COOKIE[‘userName’]))
$loginName = $_COOKIE[‘userName’];
$result = @mysql_query(“SELECT * FROM users WHERE userName = ‘$loginName'”,$db);
$myrow = @mysql_fetch_array($result);
$userRank = $myrow[userRank];

The coding above is for a login box in which (from what I can gather so far) looks for a saved cookie on a users computer to find their username and password. If the cookie is found then fine, if not then a username needs to be filled in and the results are searched through a mysql database in order to find the participant. Also like Actionscript the coding uses the { } tags to separate specific parts of the coding. IF (something == something else)
THEN Statement
} else {
ELSE Statement

PHP scripts are always enclosed in between two PHP tags. This tells your server to pass the information between them as PHP. The three different forms are as follows: <?
PHP Code In Here

PHP Code In Here

<script language=”php”>
PHP Code In Here

While looking through a Website blog production folder on my PC I gained from a work experience, I noticed that a PHP production folder and a HTML production folder differ a lot in its structures. In order to organise the mass amount of external files required in a PHP project, a lot more folders are needed. Unlike in HTML project (unless you want to be really unstructured and messy) you cant just get away with the simple IMAGE FOLDER and CONSTRUCTS FOLDER’s instead you require at least a TEMPLATE FOLDER, INCLUDE FOLDER, ADMIN FOLDER and EDITOR FOLDER. With so many extra files flying around it is really important to keep them organised.  

Here are a few things PHP can do: •Ad Management
•Multi-Level Marketing
•Polls and Voting’s
•Form Processors
•Discussion Boards
•Text Processing
•Creating Virtual Communities
•Web Fetching
•Tests and Quizzes
•Quote Displays
•Reviews and Ratings
•Music Libraries 

For more information into what you can to with PHP please follow this link to a tutorial site         



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: