O’Reilly news

"Web Database Applications with PHP and MySQL, Second Edition": The Building Blocks of Effective Database-Driven Sites

June 2, 2004

Sebastopol, CA--Virtually any site you find on the Internet today that offers more than static HTML is built upon a well-designed database and a suite of applications that allow a web front end to interact with it. The newly updated second edition of Web Database Applications with PHP and MySQL (O'Reilly, US $44.95), by Hugh E. Williams and David Lane, shows developers how to combine two of the most important building blocks of such sites to create compelling web sites of their own. Both open source technologies, MySQL is a database query language and PHP a server-side, cross-platform, HTML-embedded scripting language used to create dynamic web content. Together, PHP and MySQL are a formidable team, combining the attractions of affordability, a gentle learning curve, and the flexibility to create what you envision.

Although there are many books available on using PHP and MySQL, Web Database Applications with PHP and MySQL, Second Edition is unique in focusing specifically on creating dynamic content for the Web using these tools. Authors Williams and Lane realized there was a need for the book after surveying the other resources available. "We found that the PHP and MySQL manuals, as well as most books, train people to use particular tools," they observed. "But almost no resources explained the principles of programming for the Web. We realized that web administrators and programmers needed to know more than what PHP functions to use and how to write SQL queries. That's where this book comes in: it'll help you learn about web database development, as well as understand the principles."

Web Database Applications with PHP and MySQL goes into detail on practical issues such 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. Then the book shows how JavaScript and PHP can be used in tandem to make a user's experience faster, with improved usability. It shows the correct way to handle errors in user input so that a site looks professional, and it introduces the vast collection of tools available in PEAR (PHP Extension and Application Repository) and shows how to use some of the more popular tools.

"You don't need to know how to program to use this book, but you do need to understand basic HTML," explain Williams and Lane. "Our introduction to PHP doesn't assume you are familiar with web scripting or are a programmer, but we do assume you understand the basic HTML constructs and are familiar with the popular web browsers. If you can use a text editor to author an HTML document that contains a form and a table, you have sufficient HTML skills to use this book."

Web Database Applications with PHP and MySQL, Second Edition introduces PHP 5 and MySQL 4.1 features, while still providing techniques that can be used on older versions of the software. This new edition has been updated and 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 throughout the book and described in detail.

To provide developers with a hands-on example of a web database application, the book introduces Hugh and Dave's Online Wines, a complete but fictional online retail site that allows users to browse, search a database, add items to a shopping cart, manage their membership, and purchase wines. Using this site as an example, developers learn how to implement searching and browsing, store user data, validate user input, manage transactions, and maintain security.

Topics covered in the book include:

  • 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, with details on the use of PEAR DB and Template classes
  • Production of PDF reports
  • If you're a web developer wanting to build a small- to medium-scale web database application that will run on modest hardware and process more than a million hits a day, Web Applications with PHP and MySQL, Second Edition is a complete tutorial that will show you how.

    Praise for the previous edition:

    "Even though it's designed primarily for web developers who want to use PHP and MySQL, those who want to learn how to develop web applications should find it a valuable resource for self-teaching. Everything about this book lives up to the reputation of O'Reilly publications: well written, well-presented, supported by a web site, and of the highest typographical standard."
    --Major Keary, Book News, 2002 No. 10

    "Web Database Applications with PHP and MySQL...combines language tutorials with application design advice to yield a comprehensive picture of its subjects at a reasonable price. Williams and Lane--both Australian academics who use an online wine store in many of their examples--deserve tremendous kudos for their way of presenting recommended coding strategies."
    --David Wall, Amazon.com, July 2002

    "The authors' approach to teaching these tools was admirable. E-commerce is one of the most popular applications on the Web and the development of such an engine employees a great many skills in terms of programming and database design. Important elements such as security, multiple users, managing inventory users, and multiple pricing thankfully received ample book time."
    --Paul Schneider, CompuNotes, September 2002

    Further reviews can be found here.

    Additional Resources:

    Web Database Applications with PHP and MySQL, Second Edition
    Hugh E. Williams, David Lane
    ISBN 0-596-00543-1, 795 pages, $44.95 US, $65.95 CA
    1-800-998-9938; 1-707-827-7000

    About O’Reilly

    O’Reilly Media spreads the knowledge of innovators through its books, online services, magazines, and conferences. Since 1978, O’Reilly Media has been a chronicler and catalyst of cutting-edge development, homing in on the technology trends that really matter and spurring their adoption by amplifying “faint signals” from the alpha geeks who are creating the future. An active participant in the technology community, the company has a long history of advocacy, meme-making, and evangelism.

    Email a link to this press release