1300 187 187
 
Web Database Applications with PHP and MySQL : OREILLY - Hugh E. Williams

Web Database Applications with PHP and MySQL

OREILLY

Paperback

Published: 23rd May 2004
Ships: 7 to 10 business days
7 to 10 business days
RRP $100.00
$58.25
42%
OFF

eBook View Product

Published: 30th June 2009
Format: ePUB
RRP $50.59
$47.75

There are many reasons for serving up dynamic content from a web site: to offer an online shopping site, create customized information pages for users, or just manage a large volume of content through a database. Anyone with a modest knowledge of HTML and web site management can learn to create dynamic content through the PHP programming language and the MySQL database. This book gives you the background and tools to do the job safely and reliably.

"Web Database Applications with PHP and MySQL," Second Edition thoroughly reflects the needs of real-world applications. It goes into detail on such practical issues as validating input (do you know what a proper credit card number looks like?), logging in users, and using templates to give your dynamic web pages a standard look.

But this book goes even further. It shows how JavaScript and PHP can be used in tandem to make a user's experience faster and more pleasant. It shows the correct way to handle errors in user input so that a site looks professional. It introduces the vast collection of powerful tools available in the PEAR repository and shows how to use some of the most popular tools.

Even while it serves as an introduction to new programmers, the book does not omit critical tasks that web sites require. For instance, every site that allows updates must handle the possibility of multiple users accessing data at the same time. This book explains how to solve the problem in detail with locking.

Through a sophisticated sample application--Hugh and Dave's Wine Store--all the important techniques of dynamic content are introduced. Good design is emphasized, such as dividing logic from presentation. The book introduces PHP 5 and MySQL 4.1 features, while providing techniques that can be used on older versions of the software that are still in widespread use.

This new edition has been redesigned around the rich offerings of PEAR. Several of these, including the Template package and the database-independent query API, are fully integrated into examples and thoroughly described in the text. Topics include: Installation and configuration of Apache, MySQL, and PHP on Unix(R), Windows(R), and Mac OS(R) X systems Introductions to PHP, SQL, and MySQL administration Session management, including the use of a custom database for improved efficiency User input validation, security, and authentication The PEAR repository, plus details on the use of PEAR DB and Template classes Production of PDF reports

Prefacep. ix
Database Applications and the Webp. 1
The Webp. 2
Three-Tier Architecturesp. 3
The PHP Scripting Languagep. 16
Introducing PHPp. 16
Conditions and Branchesp. 28
Loopsp. 33
Functionsp. 36
Working with Typesp. 37
User-Defined Functionsp. 43
A Working Examplep. 53
Arrays, Strings, and Advanced Data Manipulation in PHPp. 57
Arraysp. 57
Stringsp. 76
Regular Expressionsp. 87
Dates and Timesp. 97
Integers and Floatsp. 103
Introduction to Object-Oriented Programming with PHP 5p. 108
Classes and Objectsp. 108
Inheritancep. 124
Throwing and Catching Exceptionsp. 131
SQL and MySQLp. 134
Database Basicsp. 135
MySQL Command Interpreterp. 140
Managing Databases and Tablesp. 142
Inserting, Updating, and Deleting Datap. 148
Querying with SQL Selectp. 152
Join Queriesp. 160
Case Study: Adding a New Winep. 168
Querying Web Databasesp. 171
Querying a MySQL Database Using PHPp. 172
Processing User Inputp. 188
MySQL Function Referencep. 208
Pearp. 219
Overviewp. 219
Core Componentsp. 220
Packagesp. 230
Writing to Web Databasesp. 251
Database Inserts, Updates, and Deletesp. 251
Issues in Writing Data to Databasesp. 270
Validation with PHP and JavaScriptp. 285
Validation and Error Reporting Principlesp. 285
Server-Side Validation with PHPp. 287
JavaScript and Client-Side Validationp. 307
Sessionsp. 338
Introducing Session Managementp. 339
PHP Session Managementp. 340
Case Study: Using Sessions in Validationp. 347
When to Use Sessionsp. 357
PHP Session API and Configurationp. 360
Authentication and Securityp. 369
HTTP Authenticationp. 369
HTTP Authentication with PHPp. 373
Form-Based Authenticationp. 385
Protecting Data on the Webp. 397
Errors, Debugging, and Deploymentp. 402
Errorsp. 402
Common Programming Errorsp. 407
Custom Error Handlersp. 412
Reportingp. 422
Creating a Reportp. 422
Producing PDFp. 427
PDF-PHP Referencep. 440
Advanced Features of Object-Oriented Programming in PHP 5p. 457
Working with Class Hierarchiesp. 457
Class Type Hintsp. 462
Abstract Classes and Interfacesp. 462
Freight Calculator Examplep. 469
Advanced SQLp. 479
Exploring with SHOWp. 480
Advanced Queryingp. 481
Manipulating Data and Databasesp. 497
Functionsp. 505
Automating Queryingp. 513
Table Typesp. 516
Backup and Recoveryp. 522
Managing Users and Privilegesp. 527
Tuning MySQLp. 532
Hugh and Dave's Online Wines: A Case Studyp. 541
Functional and System Requirementsp. 542
Application Overviewp. 544
Common Componentsp. 551
Managing Customersp. 583
Code Overviewp. 584
Customer Validationp. 587
The Customer Formp. 591
The Shopping Cartp. 596
Code Overviewp. 597
The Winestore Home Pagep. 598
The Shopping Cart Implementationp. 604
Ordering and Shipping at the Online Winestorep. 618
Code Overviewp. 618
Credit Card and Shipping Instructionsp. 620
Finalizing Ordersp. 624
HTML and Email Receiptsp. 630
Searching and Authentication in the Online Winestorep. 642
Code Overviewp. 643
Searching and Browsingp. 648
Authenticationp. 658
Linux Installation Guidep. 667
Microsoft Windows Installation Guidep. 688
Mac OS X Installation Guidep. 698
Web Protocolsp. 714
Modeling and Designing Relational Databasesp. 726
Managing Sessions in the Database Tierp. 746
Resourcesp. 761
The Improved MySQL Libraryp. 766
Indexp. 779
Table of Contents provided by Ingram. All Rights Reserved.

ISBN: 9780596005436
ISBN-10: 0596005431
Series: OREILLY
Audience: Professional
Format: Paperback
Language: English
Number Of Pages: 795
Published: 23rd May 2004
Publisher: O#8242;Reilly
Dimensions (cm): 22.9 x 18.0  x 4.48
Weight (kg): 1.09
Edition Number: 2