Web Database Applications with PHP & MySQL, 2/e

Hugh E. Williams, David Lane

  • 出版商: O'Reilly
  • 出版日期: 2004-06-22
  • 定價: $1,650
  • 售價: 5.0$825
  • 語言: 英文
  • 頁數: 680
  • 裝訂: Paperback
  • ISBN: 0596005431
  • ISBN-13: 9780596005436
  • 相關分類: MySQLPHPSQL資料庫
  • 立即出貨 (庫存=1)

買這商品的人也買了...

相關主題

商品描述

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 thorougly described in the text. Topics include:

  • Installation and configuration of Apache, MySQL, and PHP on Unix®, Windows®, and Mac OS® 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

Table of Contents

Preface

1. Database Applications and the Web
     The Web
     Three-Tier Architectures

2. The PHP Scripting Language
     Introducing PHP
     Conditions and Branches
     Loops
     Functions
     Working with Types
     User-Defined Functions
     A Working Example

3. Arrays, Strings, and Advanced Data Manipulation in PHP
     Arrays
     Strings
     Regular Expressions
     Dates and Times
     Integers and Floats

4. Introduction to Object-Oriented Programming with PHP 5
     Classes and Objects
     Inheritance
     Throwing and Catching Exceptions

5. SQL and MySQL
     Database Basics
     MySQL Command Interpreter
     Managing Databases and Tables
     Inserting, Updating, and Deleting Data
     Querying with SQL SELECT
     Join Queries
     Case Study: Adding a New Wine

6. Querying Web Databases
     Querying a MySQL Database Using PHP
     Processing User Input
     MySQL Function Reference

7. PEAR
     Overview
     Core Components
     Packages

8. Writing to Web Databases
     Database Inserts, Updates, and Deletes
     Issues in Writing Data to Databases

9. Validation with PHP and JavaScript
     Validation and Error Reporting Principles
     Server-Side Validation with PHP
     JavaScript and Client-Side Validation

10. Sessions
     Introducing Session Management
     PHP Session Management
     Case Study: Using Sessions in Validation
     When to Use Sessions
     PHP Session API and Configuration

11. Authentication and Security
     HTTP Authentication
     HTTP Authentication with PHP
     Form-Based Authentication
     Protecting Data on the Web

12. Errors, Debugging, and Deployment
     Errors
     Common Programming Errors
     Custom Error Handlers

13. Reporting
     Creating a Report
     Producing PDF
     PDF-PHP Reference

14. Advanced Features of Object-Oriented Programming in PHP 5
     Working with Class Hierarchies
     Class Type Hints
     Abstract Classes and Interfaces
     Freight Calculator Example

15. Advanced SQL
     Exploring with SHOW
     Advanced Querying
     Manipulating Data and Databases
     Functions
     Automating Querying
     Table Types
     Backup and Recovery
     Managing Users and Privileges
     Tuning MySQL

16. Hugh and Dave's Online Wines: A Case Study
     Functional and System Requirements
     Application Overview
     Common Components

17. Managing Customers
     Code Overview
     Customer Validation
     The Customer Form

18. The Shopping Cart
     Code Overview
     The Winestore Home Page
     The Shopping Cart Implementation

19. Ordering and Shipping at the Online Winestore
     Code Overview
     Credit Card and Shipping Instructions
     Finalizing Orders
     HTML and Email Receipts

20. Searching and Authentication in the Online Winestore
     Code Overview
     Searching and Browsing
     Authentication

A. Linux Installation Guide

B. Microsoft Windows Installation Guide

C. Mac OS X Installation Guide

D. Web Protocols

E. Modeling and Designing Relational Databases

F. Managing Sessions in the Database Tier

G. Resources

H. The Improved MySQL Library

Index

商品描述(中文翻譯)

從網站提供動態內容有很多原因:提供網上購物網站、為用戶創建定制的信息頁面,或者通過數據庫管理大量內容。只要具備基本的HTML和網站管理知識,任何人都可以通過PHP編程語言和MySQL數據庫學習創建動態內容的方法。本書為您提供了背景知識和工具,以安全可靠地完成這項工作。

《使用PHP和MySQL創建Web數據庫應用程序》第二版徹底反映了現實應用的需求。它詳細介紹了實際問題,如驗證輸入(您知道正確的信用卡號碼是什麼樣的嗎?)、用戶登錄和使用模板為動態網頁提供標準外觀。

但是,本書還更進一步。它展示了如何結合JavaScript和PHP,使用戶體驗更快、更愉悅。它展示了處理用戶輸入錯誤的正確方法,使網站看起來專業。它介紹了PEAR存儲庫中豐富的強大工具集,並展示了如何使用其中一些最受歡迎的工具。

即使作為新程序員的入門指南,本書也不會忽略網站所需的關鍵任務。例如,允許更新的每個網站都必須處理多個用戶同時訪問數據的可能性。本書詳細解釋了如何通過鎖定來解決這個問題。

通過一個複雜的示例應用程序——Hugh和Dave的葡萄酒商店,介紹了動態內容的所有重要技術。強調良好的設計,如將邏輯與表現分開。本書介紹了PHP 5和MySQL 4.1的功能,同時提供了可用於仍在廣泛使用的舊版本軟件的技術。

這個新版本圍繞PEAR的豐富功能進行了重新設計。其中幾個功能,包括模板包和獨立於數據庫的查詢API,已完全集成到示例中並在文本中詳細描述。主題包括:
- 在Unix、Windows和Mac OS X系統上安裝和配置Apache、MySQL和PHP
- PHP、SQL和MySQL管理的介紹
- 會話管理,包括使用自定義數據庫提高效率
- 用戶輸入驗證、安全性和身份驗證
- PEAR存儲庫,以及有關使用PEAR DB和模板類的詳細信息
- 生成PDF報告

目錄:
- 前言
- 第1章:數據庫應用程序和Web
- 第2章:PHP腳本語言
- 第3章:PHP中的數組、字符串和高級數據操作
- 第4章:使用PHP 5進行面向對象編程介紹
- 第5章:SQL和MySQL

以上是部分內容,詳細內容請參閱原文。