PHP 5 for Dummies Free Open Book

PHP 5 for Dummies

Previous PageNext Page
Chapter 3
Creating Your First PHP Script
In This Chapter
Writing PHP statements
Adding PHP sections to HTML files
Writing PHP output statements
Documenting your scripts
A
PHP statementis an instruction that tells PHP to perform an action. A
PHP scriptis a series of PHP statements. Theoretically, a script can con-
tain as few as one statement, but it’s unlikely that any practical script would
consist of a single statement. In most cases, you write scripts that contain
several statements in a row. PHP executes the statements one at a time until
it reaches the end of the script.
As discussed in Chapter 1, PHP can do many things, and scripts are the
method you use to tell PHP what you want it to do. You can tell it to display
some text on a Web page or to store data that a user entered into a form on
your Web page. PHP can also do things that are unrelated to Web sites, such
as back up all the files in a directory on your hard disk. You can write simple
scripts that just display 
hello
in a Web browser. Or you can write complicated
scripts that display different things in the Web browser for different people,
or request passwords from Web site visitors and refuse access to visitors who
don’t enter valid passwords. Applications often consist of two or more scripts
that work together to accomplish the job required. A large, complicated appli-
cation, such as an e-commerce application, can consist of many scripts.
In this chapter, I explain how to write your first script. I also discuss output
statements, which are the most common PHP statements. Finally, I illustrate
the importance of documenting your script. 
Previous PageNext Page


     Main Menu
PHP 5 for Dummies
Table of Contents
Introduction
Part I: Say Hello to the PHP Scripting Language
Icons Used in This Book - Page 25
Chapter 1: Getting to Know PHP
Chapter 2: Setting Up the Environment
Chapter 3: Creating Your First PHP Script
Writing PHP Statements
Building Scripts
Writing Your First Script
Discovering More about Output Statements
Documenting the Script
Part II: Variables and Data
Part III: Basic PHP Programming
Part IV: Common PHP Applications
Part V: The Part of Tens
Part VI: Appendixes
Index
Team DDU


More Books
PHP Hacks
Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
The Koran (Holy Qur'an)
Macromedia Flash 8 Bible
Search Engine Optimization for Dummies
YouTube Traffic
PHP 5 for Dummies
Harry Potter and The Chamber of Secrets
Harry Potter and the Sorcerer's Stone
The Pilgrim's Progress
Wireless Hacks
Flash Hacks. 100 Industrial-Strength Tips & Tools
PayPal Hacks. 100 Industrial-Strength Tips and Tools
Amazon Hacks
Pdf Hacks
The Da Vinci Code
Google Hacks
The Holy Bible
Windows XP For Dummies
Harry Potter and the Half-Blood Prince
Seo Book
Upgrading and Repairing Networks
Macromedia Dreamweaver 8 UNLEASHED
Windows XP Annoyances
Windows XP Hacks
Microsoft Windows XP Power Toolkit
Teach Yourself MS Office In 24Hours
iPod & iTunes Missing Manual
PC Hacks 100 Industrial-Strength Tips and Tools
PC Overclocking, Optimization, and Tuning - 2th Edition
PC Hardware In A Nutshell 3rd Edition
PC Hardware in a Nutshell, 2nd Edition
Upgrading and Repairing PCs
Google for Dummies
MySQL Cookbook
Teach Yourself Macromedia Flash 8 In 24 Hours
PHP CookBook
Sams Teach Yourself JavaScript in 24 Hours
PHP5 Manual
Free Games Paper Airplanes
500 Juegos Gratis 500 Giochi Gratis 500 Jeux Gratuits 500 Jogos Gratis 500 Kostenlose Spiele