Web Database Applications with PHP and MySQL, 2nd Edition
Building Effective Database-Driven Web Sites
Publisher: O'Reilly Media
Final Release Date: May 2004
Pages: 820

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 templatesto 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®, 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
Product Details
About the Author
Recommended for You
Customer Reviews


by PowerReviews
oreillyWeb Database Applications with PHP and MySQL, 2nd Edition

(based on 8 reviews)

Ratings Distribution

  • 5 Stars



  • 4 Stars



  • 3 Stars



  • 2 Stars



  • 1 Stars



Reviewed by 8 customers

Displaying reviews 1-8

Back to top

(13 of 16 customers found this review helpful)


Book Website needs attention

By Vladik

from Moscow

About Me Developer

Verified Reviewer



    • Outdated
    • Website needs attention

    Best Uses

      Comments about oreilly Web Database Applications with PHP and MySQL, 2nd Edition:

      The URL provided by Layla is a direct link to the web application itself, while the URL provided in Merchant response is a link to the website from where you can browse the source code or run the application. running the application is done by clicking a link named "run the application" which takes you to the link Layla mentioned.

      Hence she was in the right URL.

      The errors on the page might be caused by a PHP upgrade, I would love to make correction to the source code to make it work since the application is actually a nice one..

      Unfortunately the book is outdated now and the book website is not maintained well.

      (2 of 4 customers found this review helpful)


      A solid php MySQL for those with (a little) php experience.

      By Anonymous

      from Undisclosed

      Comments about oreilly Web Database Applications with PHP and MySQL, 2nd Edition:

      I think that this is a solid book for non-newbie php programmers. Typical of many O'Reilly titles, it is refreshing to read and the code snippits are often good examples which well illustrate the point that is being explained.

      If you expect simply to cut and paste the code for the entire example application (i.e. wine store), and then have it work as you wish in your server environment with little or no modification whatsoever, then you probably should be using canned apps instead of writing your own app anyway.

      (0 of 3 customers found this review helpful)


      mostly good

      By tommykay

      from Undisclosed

      Comments about oreilly Web Database Applications with PHP and MySQL, 2nd Edition:

      I bought two PHP/SQL books, and prefer this one. But I'm not totally satisfied with my purchase. I enjoy the writing, and feel the pace and organization make sense.

      I don't mind there is no CD, I think a quick download is usually a better alternative. But the download for this book left me wondering what was what.

      And of course, it is disappointing to see the Wine Store example program on the OReilly web site throws an error and refuses to run.

      (0 of 4 customers found this review helpful)


      halve mamal - halve bird

      By pampers

      from Undisclosed

      Comments about oreilly Web Database Applications with PHP and MySQL, 2nd Edition:

      Well, it is allright, not great or so. I am a db-programmer, and just started using php. A need a sort of winestore-application, but I can't get the application working without a huge list of errors. The other examples in the book worked ok. I wouldn't recommand it for people wanting to start webbased db-apps...

      (1 of 3 customers found this review helpful)


      Wonderful book, I thoroughly enjoyed it.

      By Steve Reynolds

      from Undisclosed

      Comments about oreilly Web Database Applications with PHP and MySQL, 2nd Edition:

      This is an excellent book for the moderately experienced programmer. I disagree that one does not need to have programming experience to read this book. This is not a book that teaches programming concepts, top-down design or even object orientation. True, one can gain some understanding, but I don't think this is the first book to pick up.

      However, if someone is already familiar with other languages, this is the perfect book to learn PHP and MySQL. The wine store example that is performed throughout the book is an excellent way to showcase PHP and MySQL. Personally, I'm able to learn faster if I have a project to work on and to apply the language. This example served that purpose for me.

      Once again, a great book, an easy read for programmers.

      (1 of 3 customers found this review helpful)


      Daring to Publish in a Time of Transition

      By corexian

      from Undisclosed

      Comments about oreilly Web Database Applications with PHP and MySQL, 2nd Edition:

      I enjoyed this book. It was well written and organized. The authors did a great job of explaining the install proceedure for Apache, PHP, and MySQL for Linux, Windows, and Mac. No small challenge, to say the least.

      As they explain before delving into matters, PHP was transitioning from version 4 to 5, and the book was being published before/during the new versions release. Anyone familiar with the differences between these two realizes that some major changes were occuring, like OOP for example. This sometimes made for confusing reading as the code from each version can look much different yet perform the same task. MySQL also had a version change, which was not quite as impacting.

      I was using a Windows install, but had already installed Apache, PHP, and MySQL on my own. So during the discussions of installations and configurations, it was sometimes difficult to match up my install with the one recommended in the book, especially when it came to setting up PEAR components. I suspect that someone following the book exclusively, from install to the final project, might avoid this confusion.

      All in all, for not being familiar with PHP before reading this book, I learned a lot very quickly. I would definitely recommend it if you need a comprehensive crash course in LAMP, which is becoming ever more popular.

      (3 of 6 customers found this review helpful)


      Get the book

      By TimP

      from Undisclosed

      Comments about oreilly Web Database Applications with PHP and MySQL, 2nd Edition:

      Lane and Williams are clearly well-versed in all aspects of their subject matter and practiced wordsmiths and teachers. If you're a "non-programmer" looking to build an interactive web-site, get the book, use it, and keep it for when your goals expand. If you're an experienced programmer looking to start work in the latest Apache/MySQL/PHP environment, it spans syntax to OO design patterns you can adopt and adapt.

      The first problem experienced by the authors of every book of this type is that of deciding how much knowledge to assume in the reader and where to start explaining. It states clearly that "You don't need to know how to program to use this book ..." While true in fact, I think this is a tall order for a single book, although the appendix of references to other resources is very good.

      Consequently, there are parts of the book that will be hard going for novice developers who must absorb and apply new terms and concepts in order to work through. Less-experienced readers must necessarily pace themselves, not just fiddle with example code from the book: pause along the way to create your own experimental applications that can be embellished and refined as your knowledge builds. The information is all there for anyone, but the conceptual baggage can be a bit heavy at times.

      This is not a failing of the book but a fact of current technology: thoroughness requires broad knowledge (contributed by entire teams in enterprise environments) beyond the mere use of a particular language and attention to details. The authors would have been remiss if they had avoided important aspects of web application design invoked by loftier issues such as object orientation, re-usability, maintainability, data modeling, server configuration, security, etc.

      The book culminates in a five chapter study of the sample application, the on-line Wine Store - complicated enough to be instructive, simple enough to keep track. It was written for Linux but I had it running under WAMP in no time. The material throughout the book constantly refers forward to the application description and the application description refers back to the more formative sections of the book. These guys are good.

      If I was teaching a course in open source web development, this would be my text book.

      (1 of 3 customers found this review helpful)


      Great for the well versed, challenging for the novice

      By M. Ladd

      from Undisclosed

      Comments about oreilly Web Database Applications with PHP and MySQL, 2nd Edition:

      I decided to purchase this book to answer the numerous question I have had about php/mysql. I had previously finished an ambitious first project using another book.

      I come from a publishing background with limited experience with programming. This book is a wonderful guide for an experienced programmer who wants to learn everything about PHP/MYSQL. As an accomplished 'beginner' I am finding this book very difficult to use. The tools along the way are useful but lacking enough depth saving the details for the 'final-exam-like projects' at the back of the book. The Winestore project is detailed and elaborate making it quite difficult to analyze small pieces of code if you are confused. To simply the experience, the author attempts to simply the code by relying on referenced files. Although I can see this is a good habit to use in coding, chasing down the references feels trying during the learning phase.

      In essense, I wish the complex code at the back of the book spent an extra chapter slowly constructing the final project.

      Displaying reviews 1-8

      Back to top

      Buy 2 Get 1 Free Free Shipping Guarantee
      Buying Options
      Immediate Access - Go Digital what's this?
      Ebook:  $39.99
      Formats:  APK, DAISY, ePub, Mobi, PDF
      Print & Ebook:  $54.99
      Print:  $49.99