did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780764557835

Beginning Php5

by ; ; ; ; ; ; ; ;
  • ISBN13:

    9780764557835

  • ISBN10:

    0764557831

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2004-07-16
  • Publisher: Wrox
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $47.99 Save up to $0.24
  • Buy New
    $47.75
    Add to Cart Free Shipping Icon Free Shipping

    PRINT ON DEMAND: 2-4 WEEKS. THIS ITEM CANNOT BE CANCELLED OR RETURNED.

Supplemental Materials

What is included with this book?

Summary

What is this book about? Beginning PHP5 is a complete tutorial in PHP5's language features and functionality, beginning with the basics and building up to the design and construction of complex data-driven Web sites. Fully functioning applications are developed through the course of the book. Other features of the book include installation guide and troubleshooting tips, introduction to relational databases, practical working examples and applications, and a detailed language reference. Here are the new topics in this edition: OOP PEAR GTK MSI CLI SQLite Error handling with try/catch

Author Biography

<b>Dave W. Mercer</b> has 15 years&#8217; experience in industrial and process engineering, and systems analysis, and is CTO for a B2B, responsible for the development and deployment of online automated business services. His entire site hosting server, and the applications he builds for hosted clients are programmed in PHP using Postgres or MySQL as the database. <p> <b>Allan Kent</b> is a PHP programmer who runs his own company and is a co-author of <i>Beginning PHP 4</i>. Alan has been programming seriously for the past dozen years and, other than the single blemish when he achieved a diploma in Cobol programming is entirely self-taught. <p> <b>Steven D. Nowicki</b> is Director of Software development at The Content Project, a Santa Monica, California-based consulting firm currently developing a massive enterprise resource planning and contact management system comprising more than 300,000 lines of OOPHP code. He has a decade of experience in large-scale software development and system architecture on all major platforms. <p> <b>David Mercer</b> is a PHP programmer and contributed to <i>Beginning PHP 4</i>. He has a keen interest in all things open source ever since he managed to put together a working Beowulf cluster by nicking old computer parts from colleagues and assembling them under his desk. He has worked on Wrox open source titles about PHP, Perl, and Linux. <p> <b>Dan Squier</b> is a longtime contributor to the Wrox community and a PHP Programmer. <p> <b>Wankyu Choi</b> is an accomplished PHP programmer and lead author of <i>Beginning PHP 4</i>. He holds a Master&#8217;s degree in English/Korean interpretation and translation form the Graduate School of Translation &amp; Interpretation.

Table of Contents

Introduction xix
Getting Up and Running
1(30)
The Roots of PHP
1(1)
Installing, Configuring, and Running PHP
2(4)
System Requirements
3(1)
php.ini, the PHP Configuration File
3(1)
Setting Up a Test Machine
4(1)
Network Connections
4(1)
Where Do You Start?
4(1)
Running PHP5
5(1)
Installing PHP5 with Linux and Apache
6(13)
Choosing Your Installation Method
6(10)
Setting up Apache for PHP
16(3)
Installing PHP5 on Windows 2000/Internet Information Server (IIS) 5
19(7)
Downloading PHP5
20(2)
php.ini and Extensions
22(4)
Testing and Troubleshooting
26(2)
Configuring PHP
28(1)
php.ini
28(1)
PHP Extensions
29(1)
Caching
29(1)
Summary
29(1)
Exercise
30(1)
Writing Simple Programs
31(32)
Create a Simple PHP Program
31(5)
Explore Some Details
33(1)
How PHP Code Works
33(3)
How Online PHP Programs Run
36(1)
Web Communications: Internet Protocols and HTTP
36(5)
TCP/IP
37(1)
The HTTP Protocol
37(4)
Using Variables in PHP
41(5)
Issues Concerning Creating Variables
41(4)
Defined Constants
45(1)
Operators and Expressions
46(16)
PHP Operators
46(1)
PHP Expressions
47(1)
Operator Types
47(11)
Arrays
58(4)
Summary
62(1)
Exercises
62(1)
PHP, HTML, and State
63(60)
HTML Primer
63(4)
The HTML Document Type Definition
65(1)
The Form and Input Elements
65(2)
Accessing PHP and HTTP Data
67(5)
Predefined Variables
67(2)
Variables in HTTP Request and Response
69(1)
SuperGlobal Arrays
69(3)
Links
72(1)
Query Strings
73(1)
HTML (Web) Forms
74(34)
HTML Form Elements
74(5)
HTML Form Fields (Controls) and PHP
79(29)
The Concept of State
108(12)
State Maintenance
108(8)
Native Sessions in PHP
116(4)
Summary
120(1)
Exercise
120(3)
Decisions, Loops, and Arrays
123(64)
Designing PHP Program Logic
123(4)
Problem Statement
123(1)
Writing Pseudo Code
124(1)
Boolean Logic
125(2)
Conditional or Branching Statements
127(18)
An Example of Branching
128(1)
if Statements
129(11)
switch Statements
140(5)
Loops and Arrays
145(40)
Loops
145(16)
Arrays
161(24)
Summary
185(1)
Exercise
185(2)
Robust and Healthy Code
187(44)
Testing and Debugging
187(2)
Values That Break Your Code
188(1)
Basic Error Types
189(1)
Debugging PHP Script
189(9)
Understanding PHP Error Messages
189(1)
Syntax Errors
190(3)
Logic Errors
193(1)
Runtime Errors
193(5)
Debugging and Handling Errors in PHP5
198(1)
Preventing the Display of Private Information
198(1)
Roll-Your-Own Debugging Tools
198(1)
Form Validation
199(21)
Using the exit Statement
200(4)
String Validation and Regular Expressions
204(9)
Validating Data Entry
213(5)
Using Regexps to Check File Path Parameters
218(2)
Handling Errors Gracefully
220(9)
Configuring PHP for Error Handling
220(2)
Try/Catch---New in PHP5
222(7)
Summary
229(1)
Exercise
230(1)
Writing High-Quality Code
231(28)
Development Planning
231(3)
Formal Software Development Processes
232(2)
Optimizing Your Code
234(1)
Using Coding Standards
234(2)
Writing User-Defined Functions in PHP
236(11)
The Structure of Functions
237(6)
Switching Functions
243(2)
How Values Get Inside Functions
245(2)
Scope of Variables
247(7)
Global and Local Variables
247(1)
Creating Static Function Variables
248(3)
Nesting
251(1)
Recursion
251(3)
The Include and Require Statements
254(3)
Things To Be Careful About with Include and Require
257(1)
Summary
257(1)
Exercise
258(1)
Files and Directories
259(54)
File and Directory Handling
260(1)
Working with Files
260(9)
Opening and Closing Files
261(3)
Getting Information About a File
264(1)
Reading and Writing to Files
264(5)
Reading and Writing Characters in Files
269(3)
Reading Entire Files
272(2)
Random Access to File Data
274(4)
Getting Information on Files
278(4)
Ownership and Permissions
282(5)
Working with Files You Own
287(3)
Splitting the Name and Path from a File
287(1)
Copying, Renaming, and Deleting Files
288(2)
Working with Directories
290(10)
Other Directory Functions
292(2)
Traversing a Directory Hierarchy
294(1)
Creating a Directory Navigator
295(5)
Building a Text Editor
300(7)
Uploading Files
307(5)
Summary
312(1)
Exercise
312(1)
XML
313(30)
What Is XML?
313(2)
XML Document Structure
315(7)
Major Parts of an XML Document
315(1)
Well-Formed XML Documents
316(1)
Using XML Elements and Attributes
317(1)
Valid XML Documents: DTDs and XML Schemas
318(4)
Web Services
322(1)
PHP and XML
322(1)
PHP4 XML Functions
323(11)
XML Parsers
329(3)
The Document Object Model
332(2)
PHP5 XML Functions
334(6)
The SimpleXML Extension
334(4)
Changing a Value with simpleXML
338(2)
Summary
340(1)
Exercise
341(2)
An Introduction to Databases and SQL
343(48)
Storing Data
344(3)
Databases and Databases
344(1)
Database Architectures
345(1)
Choosing a Database
346(1)
Setting Up MySQL
347(4)
Installing on Windows
347(1)
Installing on Linux
348(2)
Configuring MySQL
350(1)
Relational Databases
351(9)
Normalization
352(3)
Talking to Databases with SQL
355(5)
A Quick Play with MySQL
360(7)
Starting the mysql Client Program
360(1)
Selecting a Database to Use
361(1)
Looking at Tables Inside a Database
362(1)
Using SQL to Look at Data
363(1)
Manipulating Data in a Database
364(1)
Using GRANT and REVOKE Commands
365(2)
Connecting to MySQL from PHP
367(1)
PHP MySQL Connectivity
368(7)
Basic Connection Functions
368(3)
Handling Server Errors
371(4)
Creating Databases and Tables from MySQL
375(13)
Creating the Sample Database and Tables with PHP
379(4)
Altering Tables
383(2)
Inserting Data into a Table
385(3)
Summary
388(3)
Retrieving Data from MySQL Using PHP
391(26)
Retrieving Data Using PHP
391(3)
SQL Statements for Retrieving Data
394(10)
Server Functions
394(1)
Retrieving Fields
395(5)
Getting Summaries
400(1)
More Complex Retrievals
401(3)
Putting It All Together
404(11)
The common_db.inc File Contents
405(2)
The userviewer.php File Contents
407(7)
Using the User Viewer
414(1)
Summary
415(2)
Using PHP to Manipulate Data in MySQL
417(44)
Inserting Records Using PHP
417(3)
Special Characters
418(1)
htmlspecialchars()
419(1)
Updating and Deleting Records in Tables
420(2)
Working with Date and Time Type Fields
422(4)
Getting Information on Database Tables
426(5)
ENUM Options and Field Defaults
431(4)
Creating a User Registration Script
435(7)
register.php
435(5)
Choosing Actions to Take
440(2)
Creating an Access Logger Script
442(7)
auth_user.php
442(2)
access_logger.php
444(5)
Creating a User Manager
449(9)
userman.php
449(8)
Choosing an Action to Take
457(1)
Summary
458(1)
Exercises
459(2)
An Introduction to Object-Oriented Programming
461(32)
What Is Object-Oriented Programming?
461(2)
Understanding OOP Concepts
463(27)
Classes
463(1)
Objects
464(13)
Inheritance
477(9)
Interfaces
486(3)
Encapsulation
489(1)
Changes to 00 in PHP5
490(1)
Summary
491(1)
Exercises
491(2)
Working with UML and Classes
493(36)
The Unified Modeling Language
493(3)
Why Would You Want to Use UML?
494(1)
UML Software
494(1)
Class Diagrams
495(1)
Creating the Contact Manager
496(7)
The Contact Manager UML Diagrams
496(4)
Other Useful UML Diagrams
500(3)
Creating the Entity Class
503(6)
Putting It All Together
509(18)
The PropertyObject Class
509(3)
The Contact Type Classes
512(4)
The DataManager Class
516(1)
The Entity, Individual, and Organization Classes
517(8)
Making Use of the System
525(2)
Summary
527(2)
Pear
529(38)
What Is PEAR?
529(5)
How Is PEAR Structured?
530(2)
Recapping PEAR Standards
532(2)
Installing PEAR Packages
534(11)
Finding Your Way Around pear.php.net
534(1)
Exploring PEAR Classes and Applications
534(1)
Installing and Using the PEAR Package Manager
535(10)
Using PEAR Packages
545(21)
Building an Application Using Two PEAR Components
551(15)
Summary
566(1)
PHP5 and E-Mail
567(18)
E-Mail Background
567(1)
Internet Mail Protocols
568(1)
Structure of an E-Mail Message
568(2)
Sending E-Mail with PHP
570(5)
Using the mail() Function
570(2)
Multipurpose Internet Mail Extensions
572(2)
PEAR Mail Libraries
574(1)
Building a Simple PHP E-Mail Application
575(8)
Summary
583(1)
Exercises
583(2)
Generating Graphics
585(28)
Basics of Computer Graphics
585(3)
Color Theory
586(1)
Coordinate Systems
586(1)
Image Types
587(1)
Working with Raster Images
588(10)
Creating a New Image
588(1)
Allocating Colors
588(1)
Basic Drawing Functions
589(9)
Manipulating Raster Images
598(9)
Opening an Existing Image
598(2)
Applying a Watermark
600(4)
Creating Thumbnails
604(3)
Using Text in Images
607(5)
Adding Standard Text
607(2)
Using True Type Fonts
609(3)
Summary
612(1)
Exercises
612(1)
Case Study: A PHP Logging Agent
613(58)
Why a Logging Agent?
614(7)
Smarty
615(5)
PHPUnit
620(1)
Designing the Logging Agent
621(7)
The sitelogs.db Database
622(2)
Using UML to Map Out the Logging Agent
624(4)
Coding the Solution
628(26)
Miscellaneous Scripts
628(4)
Data-Handling Scripts
632(13)
Validation and Error-Handling Scripts
645(6)
Presentation Scripts and Templates
651(3)
Testing the Application
654(11)
Working with the Logging Agent
665(5)
userlog.php
666(1)
Viewing the Logging Agent
666(4)
Summary
670(1)
Appendix A: Answers 671(22)
Appendix B: PHP Functions Reference 693(72)
Appendix C: Using SQLite 765(16)
Appendix D: ODBC 781(14)
Appendix E: PHP CLI 795(10)
Appendix F: Configuring PHP5 805(24)
Index 829

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program