Tải bản đầy đủ

PHP 5 e commerce development

www.it-ebooks.info


PHP 5 e-commerce
Development
Create a flexible framework in PHP for a powerful
e-commerce solution

Michael Peacock

BIRMINGHAM - MUMBAI

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


PHP 5 e-commerce Development
Copyright © 2010 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval

system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the author, nor Packt
Publishing, and its dealers and distributors will be held liable for any damages
caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

First published: January 2010

Production Reference: 1140110

Published by Packt Publishing Ltd.
32 Lincoln Road
Olton
Birmingham, B27 6PA, UK.
ISBN 978-1-847199-64-5
www.packtpub.com

Cover Image by Vinayak Chittar (vinayak.chittar@gmail.com)

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Credits
Author

Production Editorial Manager

Michael Peacock

Abhijeet Deobhakta

Reviewers



Editorial Team Leader

Chetankumar Akarte

Gagandeep Singh

Tahsin Hasan
Project Team Leader
Lata Basantani

Acquisition Editor
Douglas Paterson

Project Coordinator
Poorvi Nair

Development Editor
Swapna V. Verlekar

Graphics
Geetanjali Sawant

Technical Editor
Ishita Dhabalia

Production Coordinator
Shantanu Zagade

Indexer
Rekha Nair

Cover Work
Shantanu Zagade

Proofreader
Sandra Hopper

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


About the Author
Michael Peacock (http://www.michaelpeacock.co.uk) is a web developer from

Newcastle on Tyne, UK with a degree in Software Engineering from the University
of Durham. After meeting his business partner while studying at Durham, he
co-founded Peacock Carter Limited (http://www.peacockcarter.co.uk), a
Newcastle-based creative consultancy specializing in web design, web development,
and corporate identity. Michael loves working on web-related projects and new
business ideas, usually with interests in several companies.
He has been involved with a number of books, having written four books: PHP 5
e-commerce Development, Drupal 6 Social Networking, Selling Online with Drupal
e-Commerce, and Building Websites with TYPO3, and acted as technical reviewer
for two others—Mobile Web Development and Drupal for Education and E-Learning.
You can follow Michael on Twitter: http://www.twitter.com/michaelpeacock.
I'd like to thank everybody at Packt Publishing, in particular
Douglas Paterson for working with me on building the idea of this
book into a suitable structure; Poorvi Nair for helping to keep the
book on track; Swapna Verlekar, the development editor; and of
course, the technical reviewers, Chetan Akarte and Tahsin Hasan,
who helped improve the quality of the book.
My thanks also go to my friends and family, in particular my fiancée
Emma for her support while working on the book.
Finally, I'd like to thank you, the reader; I hope that you enjoy this
book, and produce a fantastic e-commerce website of your own. I
look forward to hearing your feedback and seeing what e-commerce
sites you come up with!

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


About the Reviewers
Chetankumar Akarte is working on PHP since last 5 years. He has extensively

worked on small- and large-scale PHP e-commerce, social networking, Wordpress,
and Joomla-based web projects. Over the years, Chetan has been actively involved
in "Xfunda Developers Community" and has regularly been blogging on Microsoft
.NET technology at http://www.tipsntracks.com.
Chetan received a Bachelor of Engineering degree in Electronics from the Nagpur
University, India in 2006. He likes to contribute on the newsgroups and forums,
and has written articles for Electronics For You, DeveloperIQ, and Flash & Flex
Developer's Magazine.
Chetan lives in Navi Mumbai, India. You can visit his websites
http://www.xfunda.com and http://www.tipsntracks.com or get
in touch with him at chetan.akarte@gmail.com.
I would like to thank my sister Poonam and Jijaji Vinay for their
consistent support and encouragement. I'd also like to thank Packt
Publishing and especially my Project Coordinator Poorvi for giving
me the opportunity to do something useful.

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Tahsin Hasan is a software engineer. He passed the Zend Certification Exam on

August 09, 2009 and has become the seventeenth Zend Certified Engineer (ZCE)
from Bangladesh. This is the topmost certification on PHP from Zend, the developer
of this outstanding scripting language. He is a tech enthusiastic and always keeps
himself well-equipped with latest technologies. He has completed his M.Sc. and B.Sc.
in Computer Science and Engineering from Jahangirnagar University.
Tahsin Hasan has profound knowledge of LAMP environment. His advanced
understanding of database environments and Apache web server is an asset. He has
proficiency in scalability and optimizing of server performance. He has worked with
Zend framework, CakePHP, Codeigniter, and Symfony.
I'd like to give thanks to my parents and my siblings for their
encouragement and also a special thanks to Poorvi Nair and
Swapna Verlekar from Packt Publishing.

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Table of Contents
Preface
Chapter 1: PHP e-commerce

e-commerce: Who, what, where, why?
An overview of e-commerce
eBay
Amazon
Brick 'N Mortar stores
Service-based companies

Why use e-commerce?
Rolling out your own framework
Why PHP?
Why a framework?
When to use an existing package?
Existing products

A look at e-commerce sites

1
7

7
7

8
8
8
8

9
9
9
9
10

10

10

iStockphoto
WooThemes
eBay
Amazon
Play.com

e-commerce: What does it need to do/have?
Products
Checkout process
General
Our framework: What is it going to do?
Our framework: Why is it going to do it?
Juniper Theatricals
Summary

11
11
12
12
12

13
13
14
14
14
15
16
17

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Table of Contents

Chapter 2: Planning our Framework
Designing a killer framework
Patterns
Model-View-Controller (MVC)
Registry
Singleton

19

19
20

20
21
22

Structure
Building a killer framework
Pattern implementation

23
24
25

MVC
Registry
Singleton
Registry objects

25
25
27
29

Routing requests

An alternative: With a router
Processing the incoming URL within our registry object
index.php
.htaccess file
Configuration file

What about e-commerce?
An e-commerce registry?
Summary

Chapter 3: Products and Categories

What we need
Product information
Category information
Structuring content within our framework
Pages
Content
Versioning

Building products, categories, and content functionality
into our framework
Database
Content
Content types
Content versions
Products
Categories

54

54
55
56
58
58

59
59
60

61

61
62
62
63

63
63
64

65
65

65
67
68
69
70

Pages within our framework

70

Products

76

Model
View
Controller

70
73
74

Model
View

76
80

[ ii ]

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Table of Contents
Controller

81

Categories

83

Model
View
Controller

84
87
89

Some thoughts
Product and category images
Routing products and categories
Featured products
Embedding products
Summary

Chapter 4: Product Variations and User Uploads
Giving users choice
Simple variants
How could this work?

92
92
92
93
93
94

95

95
96

96

Combinations of variants

96

How will this work?
High-level overview
Database structure
Template switching
Templates
A look back at simple variants

96
97
98
100
103
104

Giving users control
How to customize a product?

104
105

Uploads
Custom text

105
105

Maintaining uploads

106

Database changes

107

Security considerations

107

Extending our products table

107

Template switching
Shopping basket preparation
Stock control
Product variations
Product customizations
Basket templates
Product subtotals
Summary

Chapter 5: Enhancing the User Experience
Juniper Theatricals
The importance of user experience
Search
Finding products

108
110
110
111
111
111
111
112

113

113
114
114
114

[ iii ]

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Table of Contents
Search box
Controlling searches with the products controller
Search results
Improving searches

Filtering products

Product attributes
Filter options
Processing filter requests
Displaying filtered products
Improving product filtering

115
115
117
118

119

120
122
125
129
130

Providing wish lists
Creating the structure
Saving wishes

130
131
132

Viewing a wish list

135

Purchases

137

Wish-list controller
Add to wish list

132
135

Controller changes
Wish-list view

135
137

Gift purchases
Self purchases

138
138

Improving the wish list
Recommendations
Related products

138
139
139

E-mail recommendations
Help! It's out of stock!
Detecting stock levels

142
143
144

Controlling the related products
Viewing the related products

141
142

Changing our controller

Out of stock: A new template bit
Tell me when it is back in stock please!
Stock alerts database table
More controller changes

It is back!
Giving power to customers
Product ratings

144

144
145

145
146

148
148
148

Saving a rating
Viewing ratings

149
151

Product reviews

152

Processing reviews/comments
Displaying reviews/comments

Combining the two?
Any other experience improvements to consider?
Summary

153
154

155
155
156

[ iv ]

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Table of Contents

Chapter 6: The Shopping Basket

Shopping baskets
Our basket
Per-page basket
Considerations for our shopping basket
Creating a basket
When to build a user's basket
Basket database
Basket contents
Viewing the basket
checkBasket method
The controller

157

157
158
158
159
160
160
160
161
162

162
164

Adding products

165

Adding customizable products

170

Adding product variants

172

An addProduct method
The controller
A note on etiquette

165
168
170

Changing our basket database
Viewing the basket
Changing the model
The controller

171
171
171
172

A new database table
Model changes
The controller

Editing quantities
From visitor to a user
The transferToUser function
Performing the transfer
Cleaning the basket
Expired contents
Displaying the basket on every page
Functionality
Summary

Chapter 7: The Checkout and Order Process
Some examples
Amazon
Limitations
Useful features

173
173
174

174
177
177
177
178
178
178
179
180

181

181
182

183
184

eBay

185

Play.com

187

Interesting points of note

186

Interesting points of note

188

[v]

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Table of Contents

The process
The basket

189
189

Voucher codes
Shipping method
An overview

189
190
190

Authentication

190

Delivery address
Payment method

191
192

Confirmation
Payment details
Payment made
Order processed
Other points of note
Summary

193
193
194
194
194
195

Why should we authenticate the user at this stage?
Login
Register
Do nothing

Offline payment method
Off-site payment method
On-site payment method

191
191
191
191

192
192
193

Chapter 8: Shipping and Tax

197

Shipping
Shipping methods
Shipping costs

Product-based shipping costs
Weight-based shipping costs
To think about: Location-based shipping costs

197
197
199

200
200
201

Shipping rules

202

Tracking
Integrating shipping costs into the basket

204
205

Tax
Separately calculating tax values
To think about: Location-based tax costs
A look at our basket now
Summary

209
210
211
211
212

Free shipping
Capped shipping

Shipping methods and a default
Calculating shipping costs based on products
Calculating shipping costs based on product weights
Considering shipping rules, and adjusting prices accordingly

204
204

205
205
206
207

[ vi ]

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Table of Contents

Chapter 9: Discounts, Vouchers, and Referrals
Discount codes
Discount codes data

Discount codes database

213

213
214

215

Discount codes functionality

215

Purchasable voucher codes
Existing functionality

219
219

Required additional functionality
Referrals
Database changes

220
220
221

Reducing the number of codes available

219

Discount codes
Product variations

219
220

New table: Referrers
Changes

221
221

Functionality

222

Checkout process consideration

222

Summary

222

Chapter 10: Checkout

223

Order process review
Authentication
Delivery address
Payment method
Confirmation
Storing orders in the database

223
225
227
228
230
230

Orders table
Order statuses
Order items
Order item attributes
Payment methods

231
232
232
233
233

Summary

Chapter 11: Taking Payment for Orders
Taking payment
Our payment system
Taking payment online
PayPal

The payment button
Processing payment to update the order

233

235

235
235
237
237

237
239

Direct with a credit/debit card

242

Other payment gateways
Payment gateway tips

244
244

Storing card details
Not storing card details

242
243

[ vii ]

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Table of Contents

Taking payment offline
Summary

Chapter 12: User Account Features
User account area
Changing details
Changing password
Changing default delivery address
Viewing orders
Listing orders
Query

245
245

247

247
247
248
249
250
250

251

Viewing an order

251

Cancelling an order

253

Order model

251

Order model additions
Controller code

254
255

Expansion
Summary

256
257

Chapter 13: Administration

259

Dashboard
Products and categories
Products

260
261
261

Creating a product
Editing a product

261
265

Categories

265

Creating a category
Editing a category
Deleting a category

265
266
266

Orders and customers
Orders

266
267

Updating an order
Dispatch note
Refunds

267
268
268

Customers area

269

Listing customers
A customer's orders

269
269

Miscellaneous
Shipping

269
269

Creating a shipping method

270

Voucher codes

270

Creating a voucher code

270

Summary

271

[ viii ]

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Table of Contents

Chapter 14: Deploying, Security, and Maintenance
Deploying
Hosting accounts and domain names
Hosting providers
Domain name registrars

273

273
274

275
276

Manual deployment

276

Automated deployment
Security
Server security

280
281
281

Passwords
SSL/TLS
CAPTCHA
Maintenance
Backing up and restoring

282
283
283
283
284

Summary

287

Setting up the database
Uploading our store
Settings

276
279
280

Software
Securing the site with a firewall

281
282

Using cPanel
Using the command line (SSH)

284
286

Chapter 15: Marketing, SEO, and Customer Retention
Marketing sites and stores powered by our framework
(and other sites for that matter)
Online advertising
Buying advertising space
Pay-per-click advertisements
Advertisement networks provided by search engines
Newsletter advertising
A word of warning: Search engine penalization

Newsletters
Marketing materials
Affiliate marketing
Social marketing
Viral marketing
Twitter
RSS with FeedBurner

289

290
290

290
291
292
293
294

295
295
296
296

296
296
297

Search engine optimization
On-site SEO

297
297

Headings
Links
Up-to-date content
Meta tags

297
298
298
298

[ ix ]

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Table of Contents
Sitemap and webmaster tools

299

Off-site SEO
Customer retention
Newsletters
Social features
Coupons and voucher codes
Summary

Appendix A: Interacting with Web Services

Google products
Adding the feed to the Google merchant center
Setting an update schedule
Creating the feed
Product feed controller
Other useful link

300
300
301
301
301
302

303

303
304
304
304

305
306

Alternative—Google Base Data API
Others
Google Analytics
Signing up
Tracking e-commerce

306
306
306
307
307

Further reading
Other services
Amazon
eBay
More to come
Summary

309
309
309
309
310
310

Add transaction
Add item
Track transaction

Appendix B: Downloadable Products

Extending products
Extending the payment and administration areas
Access database
Providing access
Rescinding access
Centralized download area
What else is needed?
Summary

307
308
308

311

311
312
312
313
314
315
315
316

[x]

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Table of Contents

Appendix C: Cookbook

317

Authentication reminders
Help! I forgot my password!

Generate the reset key, update the user record, and e-mail the customer
Reset the password

Help! I forgot my username!
E-mailing customers
Integrating Campaign Monitor
Integrating reCAPTCHA
On the registration page
When processing the registration
Tweeting about happy customers
Other uses
Summary

Index

317
317

318
318

319
319
320
320
321
321
321
322
323

325

[ xi ]

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Preface
The popularity of online shopping has increased dramatically over the past few
years. There are plenty of options available if you not are planning to build your own
e-commerce solution, but sometimes it's better to use your own solutions. It may be
easy to find an e-commerce system but when it comes to extending it or using it, you
might come across a lot of difficulties.
This book will show you how to create your own PHP framework that can
be extended and used with ease, particularly for e-commerce sites. Using this
framework you will be able to display and manage products, customize products,
create wish lists, make recommendations to customers based on previous purchases,
send e-mail notifications when certain products are in stock, rate the products online,
and much more.
This book helps you build a Model-View-Controller style framework, which is then
used to put together an e-commerce application. The framework contains template
management, database management, and user authentication management. With
core functionality in place, e-commerce-focused features are gradually added to the
framework including products, categories, customizable products with different
variations and customer input, wish lists, recommendations, the shopping basket,
and a complete order process.
At the end of the book, you will have an e-commerce architecture that will take you
from viewing or searching for products and adding them to your basket, through
the checkout process and making payment for your order to your order being
dispatched. Focus is placed on flexibility, so that the framework can be extended as
the needs of a particular store change, as illustrated by one of the appendices, which
goes through the process of modifying the store to sell downloadable products, as
well as physical ones.

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Preface

Supplementary information, such as how to market and promote an online
store, in addition to taking regular backups and performing maintenance is also
covered, ensuring you have every chance of success with your own e-commerce
framework-backed store.

What this book covers

Chapter 1, PHP e-commerce, looks into the growing need and use of e-commerce,
including various popular online retailers, and discusses what we are going to do
throughout the book, and why.
Chapter 2, Planning our Framework, introduces you to several key architectural
patterns, including MVC, Registry, and Singleton, as we develop the structure and
core functionality for our framework including template management, database
management, and user authentication.
Chapter 3, Products and Categories, takes a step further and demonstrates how to
display and categorize products within our framework for our customers.
Chapter 4, Product Variations and User Uploads, moves on to enhancing the standard
product listings with customizable products, product variations, and allowing
customers to upload files with their orders.
Chapter 5, Enhancing the User Experience, discusses tips and tricks to enhance user
experience by looking at search, product filtering, providing wish lists, sending
e-mail notifications, and other useful enhancements for our customers.
Chapter 6, The Shopping Basket, demonstrates how to structure, build, and manage
the shopping basket supporting both standard and customized products.
Chapter 7, The Checkout and Order Process, looks at the checkout and order process
implemented by some of the popular e-stores and their pros and cons, to chalk out
the process for our own framework.
Chapter 8, Shipping and Taxes, focuses on calculating shipping costs based on
different methods, integrating third-party shipping APIs, sending shipping and
tracking notifications on orders, and integrating tax costs into our system.
Chapter 9, Discounts, Vouchers, and Referrals, aims at extending our framework to
encourage new customers and orders by promoting our store through discount
codes, purchasable vouchers, and referral discounts.
Chapter 10, Checkout, ties everything together, as most of our checkout functionality
is already in place, and extends our order process to leave our customers with a
confirmed order, ready for their payment.
[2]

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Preface

Chapter 11, Taking Payment for Orders, introduces payment processing to the
framework, covering different modes of payment and various post-payment
steps involved.
Chapter 12, User Account Features, walks through the development of a customers
area where they can see as well as edit their orders and profile information.
Chapter 13, Administration, walks through the development of an administrators area
where they can see orders, products, and settings, and add, edit, and remove these.
Chapter 14, Deploying, Security, and Maintenance, looks at deploying our site using
the framework into a live environment and examines the security and maintenance
concerns, introducing different ways to enhance security of our framework and to
restore a live site from a backup.
Chapter 15, Marketing, SEO, and Customer Retention, discusses hints and tips for
effectively marketing and promoting websites and e-commerce stores with online
marketing techniques, search engine optimization, and customer retention strategies.
Appendix A, Interacting with Web Services, explains how we may interact with other
e-commerce-related web services, such as Google products, Google Analytics,
Amazon web services, and eBay developer center, in order to target new markets,
or to make tasks easier for us.
Appendix B, Downloadable products, illustrates how to extend our store to allow
downloadable products.
Appendix C, Cookbook, goes through a number of useful code snippets to enhance the
framework and our store.

What you need for this book

In the course of this book, you will need the following software utilities to try out
various code examples listed:


Apache 1.3 or above (2 recommended)



Apache mod_rewrite module



MySQL 5.0



PHP 5.0 (5.2+ recommended)

The above can be installed using a package such as WampServer 2.0 for Windows.
For development, a text editor is all that is required, though one with syntax
highlighting would be beneficial.
[3]

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Preface

Who this book is for

If you are a web developer, or anyone looking to increase your understanding
of e-commerce site development, this book is for you. Primarily aimed at PHP
developers, it is suitable for any web developer interested in enhancing their
e-commerce knowledge, or developers looking to move towards PHP.
Intermediate knowledge of PHP development and object-oriented programming is
assumed, and basic knowledge of e-commerce principles will be of benefit too.

Conventions

In this book, you will find a number of styles of text that distinguish between
different kinds of information. Here are some examples of these styles, and an
explanation of their meaning.
Code words in text are shown as follows: "The suffix of ecomframe is used to allow
us to store multiple database connection details within the same array."
A block of code is set as follows:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


{title}
content="text/html;
charset=iso-8859-1" />





When we wish to draw your attention to a particular part of a code block, the
relevant lines or items are set in bold:
SELECT v.name AS product_name, c.ID AS product_id,
(SELECT GROUP_CONCAT( a.name,'--AV--', av.ID, '--AV--',
av.name SEPARATOR '---ATTR---' )
FROM product_attribute_values av,
product_attribute_value_association ava,
product_attributes a
WHERE a.ID = av.attribute_id AND av.ID=ava.attribute_id
AND ava.product_id=c.ID ORDER BY ava.order ) AS attributes,

[4]

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Preface
p.image AS product_image, p.stock AS product_stock,
p.weight AS product_weight, p.price AS product_price,
p.SKU AS product_sku, p.featured AS product_featured,
v.heading AS product_heading,
v.content AS product_description,
v.metakeywords AS metakeywords,
v.metarobots AS metarobots,
v.metadescription AS metadescription
FROM content_versions v, content c, content_types t,
content_types_products p
WHERE c.active=1 AND c.secure=0 AND c.type=t.ID
AND t.reference='product' AND p.content_version=v.ID
AND v.ID=c.current_revision AND c.path='{$productPath}'

Any command-line input or output is written as follows:
Mysql –u username –p databasename < /home/junipert/backup.sql

New terms and important words are shown in bold. Words that you see on the
screen, in menus or dialog boxes for example, appear in the text like this: "Once we
have entered the username and password, we need to click on the Next Step button."
Warnings or important notes appear in a box like this.

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about
this book—what you liked or may have disliked. Reader feedback is important for us
to develop titles that you really get the most out of.
To send us general feedback, simply send an email to feedback@packtpub.com, and
mention the book title via the subject of your message.
If there is a book that you need and would like to see us publish, please
send us a note in the SUGGEST A TITLE form on www.packtpub.com or
e-mail suggest@packtpub.com.
If there is a topic that you have expertise in and you are interested in either writing
or contributing to a book on, see our author guide on www.packtpub.com/authors.
[5]

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Preface

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to
help you to get the most from your purchase.
Downloading the example code for the book
Visit http://www.packtpub.com/files/code/9645_Code.zip
to directly download the example code.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do
happen. If you find a mistake in one of our books—maybe a mistake in the text or the
code—we would be grateful if you would report this to us. By doing so, you can save
other readers from frustration, and help us to improve subsequent versions of this
book. If you find any errata, please report them by visiting http://www.packtpub.
com/support, selecting your book, clicking on the let us know link, and entering the
details of your errata. Once your errata are verified, your submission will be accepted
and the errata added to any list of existing errata. Any existing errata can be viewed
by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media.
At Packt, we take the protection of our copyright and licenses very seriously. If you
come across any illegal copies of our works, in any form, on the Internet, please
provide us with the location address or web site name immediately so that we can
pursue a remedy.
Please contact us at copyright@packtpub.com with a link to the suspected
pirated material.
We appreciate your help in protecting our authors, and our ability to bring you
valuable content.

Questions

You can contact us at questions@packtpub.com if you are having a problem with any
aspect of the book, and we will do our best to address it.

[6]

www.it-ebooks.info
This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010
953 Quincy Drive, , Brick, , 08724


Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay

×