Start reading Beginning PHP 5 and MySQL E-Commerce: From Novice to Prof... on your Kindle in under a minute. Don't have a Kindle? Get your Kindle here.

Deliver to your Kindle or other device


Try it free

Sample the beginning of this book for free

Deliver to your Kindle or other device

Sorry, this item is not available in
Image not available for

Beginning PHP 5 and MySQL E-Commerce: From Novice to Professional (Books for Professionals by Professionals) [Kindle Edition]

Cristian Darie , Mihai Bucica
4.0 out of 5 stars  See all reviews (1 customer review)

Digital List Price: CDN$ 46.92 What's this?
Print List Price: CDN$ 60.95
Kindle Price: CDN$ 37.54 includes free international wireless delivery via Amazon Whispernet
You Save: CDN$ 23.41 (38%)

Free Kindle Reading App Anybody can read Kindle books even without a Kindle device with the FREE Kindle app for smartphones, tablets, and computers.

To get the free app, enter your e-mail address or mobile phone number.


Amazon Price New from Used from
Kindle Edition CDN $37.54  
Paperback CDN $60.95  

Product Description

Product Description

Beginning PHP 5 E-Commerce: From Novice to Professional is an ideal reference for intermediate PHP 5 and MySQL developers, and programmers familiar with web development technologies. This book covers every step of the design and build process, and provides rich examples that will enable you to build high-quality, extendable e-commerce websites.

Furthermore, this book covers site building in three phases. Phase one results in a live website, with an attractive interface and fully searchable product catalog. Next, phase two explains adding facilities to increase sales through cross-selling, upselling, and enhancing customer service. Finally, phase three seeks to reduce costs through automated order processing and integrating with other systems via XML Web services.

About the Author

Cristian Darie is a software engineer with experience in a wide range of modern technologies, and the author of numerous books, including his popular ASP.NET C# E-Commerce tutorial, his AJAX and PHP tutorial, and his SEO tutorial for PHP developers. Cristian is studying distributed application architectures for his PhD, and is getting involved with various commercial and research projects. When not planning to buy Google, he enjoys his bit of social life. If you want to say "Hi," you can reach Cristian through his personal website,

Mihai Bucica started programming and competing in programming contests (winning many of them), all at age twelve. With a bachelor's degree in computer science from the Automatic Control and Computers Faculty of the Politehnica University of Bucharest, Romania, Bucica works as an Outsourcing Project Manager for Galaxy Soft SRL. Even after working with a multitude of languages and technologies, Bucica's programming language of choice remains C++, and he loves the LGPL word.

Product Details

  • Format: Kindle Edition
  • File Size: 6182 KB
  • Print Length: 568 pages
  • Publisher: Apress (Nov. 23 2004)
  • Sold by: Amazon Digital Services, Inc.
  • Language: English
  • ASIN: B001IKJL38
  • Text-to-Speech: Enabled
  • X-Ray:
  • Word Wise: Not Enabled
  • Enhanced Typesetting: Not Enabled
  • Average Customer Review: 4.0 out of 5 stars  See all reviews (1 customer review)
  •  Would you like to give feedback on images?

Customer Reviews

5 star
3 star
2 star
1 star
4.0 out of 5 stars
4.0 out of 5 stars
Most helpful customer reviews
4.0 out of 5 stars Not bad May 18 2005
Format:Paperback|Verified Purchase
I read most of this book and the writing approach is not bad, but there is no way that this book is for professionals.
The topics covered are well explained and the code is precisely structured and properly divided, just like it should be with any object oriented book. The downfalls I consider for this book is that, it does not cover topics such as multiple database connections, which many websites now have (connecting to MySQL, Oracle, MSSQL simultaneously). And another extremely important topic not covered is the multi-lingual design. Most sites now require programmers to create sites in more than two languages (English, French, German, etc.) and I would like to see that in future versions of this book. Still this book is an excellent start for an E-commerce website with PHP (furthermore, the logic behind it is great for any e-commerce website).
Was this review helpful to you?
Most Helpful Customer Reviews on (beta) 4.3 out of 5 stars  24 reviews
46 of 50 people found the following review helpful
3.0 out of 5 stars Smarty E-Commerce July 3 2005
By Michael B. Brand - Published on
Format:Paperback|Verified Purchase
The other reviewers did not emphasize a point I did not grasp until I bought the book. The book does not just introduce Smarty as a concept. A major trust of the book is Smarty. It could even be argued that the book is really about using Smarty for e-commerce and how to write PHP code to support Smarty. There is very little MySQL-specific info (mainly just an introduction to PEAR DB and use of standard SQL queries). If you are not planning to use Smarty for presentation templating, there is not much to be gained from reading this book. If you are going to use Smarty, then this book offers a cookbook approach with some theory.

As I will not be using Smarty in my project, I am dissapointed in the book and have gleaned just a few new ideas. Reading this book has also confirmed my decision to not use Smarty. In my opinion, Smarty needlessly adds a level of complexity on top of the PHP code and is not designed for editing in WYSIWYG editors such as Dreamweaver. There are several templating engines that are simpler to learn and use than Smarty (eg, Flexy). It seems to me that the whole book would have benefited from using a simpler templating engine and making the book less dependent on a single method of presentation (ie, Smarty).
15 of 15 people found the following review helpful
5.0 out of 5 stars THE BOOK the industry doesn't want you to have! Darie Rocks! Feb. 9 2005
By Dude - Published on
I have bought numerous programming books in the past and have always wanted a thorough book that covers detailed development of an e-Commerce website. I've bought several that claim to be indepth in this area but they have all fallen short of being what I was looking for. I've never bought a book without reading the reviews on it first....but this book was so new when I bought it that there were no reviews available for it. It sounded like it contained what I was looking for so I took a chance and bought it. I'm really glad I took that chance! "Beginning PHP 5 and MySQL E-Commerce: From Novice to Professional" is THE ABSOLUTE BEST BOOK available that details, step-by-step, how to build a full-fledge e-Commerce website...and believe me, I have bought every PHP/MySQL book (plus many more) that can't hold up to their claims....but this book delivers what the others can't. This is truly a ONE OF A KIND book.

Firstly, this books covers the ins and outs of installing PHP, PEAR, MySQL, and Apache on your Unix based machine (installations for Windows systems are also covered).

Secondly, the book shows you detailed code that performs different functions and then explains step-by-step what each bit of the code is doing.

Plus, this is THE ONLY book that will show you how to do database queries that return images from a product catalog and lay out the images with a description and link to a product page. The other PHP / MySQL books only go as far as showing you how to build a page header and footer with text only query results.

Also, the book helps you set up your site for future expansion. It uses Smarty Templating for page layouts so that your site is easy to modify and maintain and Darie shows you how to use PEAR DB abstraction to allow for changes in the type of database you might decide to use in the future (ex. , migrating from MySQL to Oracle). That being said, the title of the book is a little misleading in the fact that MySQL is used very little in this book. The book uses PEAR to perform the MySQL functionality.

I have bought books in the past that end up being written hastily with poor writing style and code errors galore. Cristian Darie and Mr. Bucica have taken the time to write a near perfect book. If you don't believe me look at the erata for this book at are almost no coding errors at all. And, their writing style really makes the book fun to read.

Lastly, and definitely worth mentioning, I ran into a PHP problem that I couldn't solve. Cristian Darie listed his website and e-mail address in the front of this book and I thought I'd try e-mailing him to help me. I didn't expect to receive a reply, especially since having e-mailed other authors in the past with no reply. Within three hours Cristian Darie had replied to my e-mail with the solution to my problem. He was very nice and polite and even offered his help if I ran into future problems as I was working through the book! This is absolutely amazing and UNPARALLELED CUSTOMER SUPPORT.

If you want to know how to develop your site the right way and learn a lot in the process, then this is the book for you!
13 of 13 people found the following review helpful
5.0 out of 5 stars Everything you need to know to build an E-commerce site Feb. 4 2005
By Harold McFarland - Published on
The use of PHP 5 and MySQL for e-commerce is a tested and proven combination. This book is primarily intended for the reader who already has some PHP knowledge and needs to understand how to build an e-commerce site. It does not focus on teaching either PHP 5 or MySQL but instead focuses on how to use the combination to produce an exceptional e-commerce solution.

The authors use the example of a Tshirt shop and walk the reader through every step of completely constructing a viable e-commerce site. The book covers everything from designing your site, to creating a product catalog, searching the catalog, receiving payments, catalog administration, creating a shopping basket, working with customer orders, product recommendations, storing customer information, secure connections, implementing the order pipeline, working with credit cards, and setting up product reviews.

The appendixes include detailed information on installing Apache, PHP, MySQL, and phpAdmin (for both Windows and Unix-like systems), hosting your web site, and project management.

While this is not a book about learning the PHP scripting language it does contain enough detailed code to create a functioning e-commerce site even if you don't understand how the code works. For example, on page 192 it says to "Create a new template file named admin_login.tpl in the templates folder and add the following code to it:..." This is followed by a long code listing that produces the desired results. There is a short explanation of the function of various sections of the code but nothing that details the purpose of each command, variable, etc. This is really not a problem since they state up front that the target audience is a PHP programmer who needs to learn how to build an e-commerce site, but it does deserve mention for those who have no knowledge of PHP and are considering the book.

The first thing a person might notice when thinking about purchasing this book is that there is no CD in the back containing all the many examples of source code. This could be very discouraging as the examples are extensive and rewriting them by hand without error can be a daunting task. However, Apress does make all of the examples available for download at their web site.

Beginning PHP 5 and MySQL E-Commerce is highly recommended for anyone who has some basic knowledge of PHP and MySQL and wants to capitalize on this to build a powerful e-commerce site.
11 of 12 people found the following review helpful
5.0 out of 5 stars Cristian Darie has done it again! March 10 2005
By Ben Jern, Loh - Published on
Cristian Darie has done it again. The last book I had authored by him was Beginning ASP.NET 1.1 E-Commerce. It was a book which guided me from the introduction of three-tier programming all the way to the creation of a full-blown, feature packed e-commerce website using Microsoft's ASP.NET Technologies.

This book, Beginning PHP 5 and MySQL E-Commerce was written with the similar concept in mind.

Very often, programmers are faced with situation where once the web application is fully developed, modifying or extending it in the near future is nothing but a nightmare! The solution? Three-Tier architecture! They are the presentation tier, business tier and the data tier. In this book, Christian Darie and his co-author Mihai Bucica, first introduces the reader into the world of three-tier architecture programming.

From there, the reader is given preliminary information such as the various technologies available for dynamic page creation and the different tools which the reader would expect to use during the course of the book such as PHP for dynamic web page generation and MySQL as the database management system.

One fundamental aspect of the book which I found rather interesting was the way the authors blended the different tools and programming language used to develop the e-commerce website with the context of the three-tier architecture as mentioned earlier.

The presentation tier here was presented with the a mix of both HTML and PHP. Instead of the confusing spaghetti code style where PHP coding is seen interleaved with HTML coding, Bucica and Darie introduced the idea of using Smarty Templates which is similar to Microsoft's ASP.NET code-behind concept where the programming language is separated from the HTML code to improve code management and readability.

The online store's business logic is then coded in PHP classes which represents the business tier of the architecture.

Then comes the third tier, also known as the data tier where the store's data management resides. This tier is represented by MySQL. However in an effort to provide a systematic way in managing SQL coding, the authors followed the idea of using Stored Procedures which, at the time of writing was not a feature available with MySQL. As such, a plugin name PEAR DB was introduced to help facilitate the usage of stored procedures.

With such clear cut separation between HTML, PHP coding, business logic PHP classes, MySQL for data management and PEAR DB to manage SQL Queries (stored procedures) , managing, upgrading and maintaining the application from a coding perspective is simply a breeze.

When it comes to learning, there is nothing like practical, hands-on work and this is where this book excels in. After introducing readers to the concept of the three-tier architecture, readers are then brought through a step-by-step creation of a fictional online e-commerce store called the TShirtShop which comes complete with a shopping cart, web based administration system for the online store all the way to receiving online payments through various channels such PayPal and credit cards.

If these may scare you, fear not, the authors present coding in a clear, easy to understand manner with suggestion of best coding practices, code manageability alongside with self-explaining comments within each snippet of code.

Another advantage when using this book is the different stages in which the authors introduce various features to compliment to the site. After completing the first few chapters (chapters 1 through 9), you have a complete site which comes with shopping cart functionality, catalogue search and ability in receiving orders. Other functionalities which were also covered in the book such as implementing credit card transactions, customer product reviews, product recommendations and integration to various web services such as that of can be implemented on a needed basis.

As such, if you have preliminary knowledge on the PHP programming language and would like to have a feature packed e-commerce solution on an open source platform, this is certainly one of the best books I would recommend to anyone venturing into the world of e-commerce.
9 of 10 people found the following review helpful
5.0 out of 5 stars Quality book for getting the job done. March 7 2006
By John Nelson - Published on
Having read all of the reviews about this book, I must interject as based on some of the more negative responses. The principal behind this book isn't on teaching you PHP by little examples here and there, and then an assimilation of little projects. It's a book designed on making a fully function eCommerce web application for usage on a small to medium professional level. The methodologies of this book are a 100% PHP5. Pure object oriented scripting, involving a new standard for database connection via the PEAR DB class, and utilizing the SMARTY template engine. I see there's some negative response in using the SMARTY template engine, as it's deemed "unnecessary" or even a means to hype this open source product.

What people must understand is that one of the contributors to this book is not only well versed in advanced PHP development, he's also an developer. Because is the "enemy" of PHP, there's obviously little or no amount of understanding how that language works in comparison to PHP. PHP is a pure scripting language, even if it has means to develop objects and classes. It's a very loose, loose "nuts and bolts" language. And it has no inherent structure. You make up the rules. So, there's a tendency for not only sloppy spaghetti code, but also sloppy methodology. Data queries can sit in the same exact page as to where the front end HTML sits. And this can be some very ugly code if you need to get back to it in a few months. Also, if you need to expand or put more advanced features in your site, it'd be almost as an enormous task as just rebuilding it from scratch trying to decipher what you have done with out a structure. Hence a need to separate out the data, the filtering, and the presentation level.

In, being a newly developed OO language, the main principal in designing on the front end is called "Code behind" or, in 2.0 "code beside". What this entails is that when you open up a brand new .aspx (the file extension of a page), you're not getting just one flat text file. You're getting a file that refers to various other files that sit "behind" the one that you're about to work on. When you script out your page utilizing the .net classes, it then automates a whole lot of behind the scenes scripting in VB/C# and even Javascipt. In the end, you get these advanced features that you would have had to spend many more hours developing in other methods and server languages.

So, it's quite obvious they are taking a .net philosophy and placing it in a PHP word. What I learned the most from this book isn't so much coding, but rather...metholodly. It's utilizing a three tier levels of development: a data layer, a business (filtering) layer, and a presentation layer. This is standard practice in the world out side of PHP.

I see that there are more advanced programmers than I that claim this isn't "professional code" All I can say to that is: This book isn't created for an enterprise level project. This is for a small to middle sized business who has a shoe string budget, but with a highly professional agenda. By the time any business out grows a catalog of this nature, they'd also have the budget to hire some of the top notch .jsp or .net programmers out there too.

So it's a great book for getting the job done. My only complaint is: It has some very strange naming conventions for the variables, sometimes even confusing (such as redundant ones like "product" and "products" I found my self debugging pages because of this problem. But I'd rather deal with that then to have a book with actual buggy code)

It even teaches you how to build the back end Content Management system to update your catalog with...(I actually think is even a better application than the Catalog it's self)

I'm using this book for my project, and I'm grateful for all the details and nuances that it's provided for me. My PHP level is full graduated novice, into the intermediate level who just wants to jump to the advanced level with out fretting. This book is a great means to do so...
Search Customer Reviews
Only search this product's reviews

Look for similar items by category