PHP5 and MySQL E-Commerce

By Blane Warrene
We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF Now

December often provides a little extra time to catch up on my reading, and one of those books this year is the new Beginning PHP5 and MySQL e-Commerce (Apress) by Cristian Darie and Mihai Bucica.

Being in the process of moving some development systems to PHP 5, I have been soaking up texts on what’s new with PHP5 as it interacts with Apache, MySQL and the rest of the Linux and Mac OS X atmosphere. This work fit right in, and also serves as a fantastic primer for anyone joining the fray in designing and developing online commerce solutions.

Darie and Bucica are directly addressing the newer and intermediate PHP programmer with their effort – a fairly substantial audience. Probably the single best accomplishment in this book is prepping the developer with some foundation theory on e-commerce architecture as well as a brief but excellent primer on project management as an appendix.

The presentation of a three-tier architecture of presentation, business and data layers offers a concise platform roadmap, especially for new developers, to start on the right footing. While there may be many approaches to architecting a web application — this method works well for online store solutions small to large.

In between, the authors present a clear case and extended ‘how-to’ for assembling an online store which ultimately offers comprehensive services including real-time credit card authorization, alternate PayPal processing, web administration of orders, product reviews as content within store listings and more.

I consider the chapter on implementing dynamic product recommendations priceless. Assembling a “customers who bought this also bought..” function is very slick (and!). Being a consumer I have found those recommendations right on point at some of my favorite online shops.

Beginning with the framework of a web site, they present an excellent case for using Smarty templates and plug-ins – a potential huge timesaver and productivity tool for endeavors of this nature. Throughout the book are complete and relevant code examples, sometimes sorely missing from other publications. Apress also offers a source code download of everything presented in the text online.

Wrapping up with good overview of web services by way of the familiar SOAP (Simple Object Access Protocol) or perhaps the less familiar (to some) REST (Representational State Transfer) will have the developer connecting to’s web services features. One can take knowledge from these exercises and leverage them with other web services resources using either method.

What may be missing is perhaps a solid brief as an appendix on the changes to PHP5 and Apache 2. This primarily for those who have spent an extended period of time working with former versions of both. There are plenty of texts and resources dedicated to documenting these changes – however it would have really rounded out an otherwise excellent offering.

The book sells for $44.99 at the publisher’s site.

Table of Contents:


We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF Now
  • I got this for Christmas and am anxious to read it.

  • obrienkev

    Would this book still be of good use for PHP 4 or is there a lot of difference between PHP4 and PHP5?

  • The basis would be the same – however – the book introduces new features specific to PHP5 as well – so it would be very helpful to someone at least planning a migration to PHP5.

  • george stuparu

    A very good book, written by specialists.

  • keng

    Would it be possible for me to use some of codes for my site?

  • b


    try this code:

    up down up down up down circle triangle square x L1 R1 L2 R2

    That will give you unlimited e-commerce firepower and 10 extra guys.

  • spacedive

    i’m in really need of a book like this… and i havent found anything so promising as this one yet….

    should i buy it?? does anyone has anything else to suggest???


    ps. i’m trying the “extra guys” cheat but its not working.. maybe its not supported by the latest php version…
    same thing happend in winxp with the “extend-weekend” cheat… :)

  • spacedive
  • survice

    i read many php and mysql book, and i decided to buy this one

    while i thought this book is a promising one, its far from a book for a beginner programmer, which i am not.

    i really wouldn’t recommend this book to a beginner programmer,
    maybe to the advanced programmer who really doesn’t need to read it.

    i will try this book in few months i will see what happens.

    bottom line:
    this book is pretty advanced