Effortless E-Commerce with PHP and MySQL

Paperback
from $0.00

Author: Larry Ullman

ISBN-10: 0321656229

ISBN-13: 9780321656223

Category: Applications & Languages - Databases

"In this comprehensive guide to creating an e-commerce Web site using PHP and MySQL, renowned author Larry Ullman walks you through every stepûdesigning the visual interface, creating the database, presenting content, generating an online catalog, managing the shopping cart, handling the order and the payment process, and fulfilling the orderûalways with security and best practices emphasized along the way. Even if you're an experienced Web developer, you're guaranteed to learn something...

Search in google:

In this comprehensive guide to creating an e-commerce Web site using PHP and MySQL, renowned author Larry Ullman walks you through every step—designing the visual interface, creating the database, presenting content, generating an online catalog, managing the shopping cart, handling the order and the payment process, and fulfilling the order—always with security and best practices emphasized along the way. Even if you’re an experienced Web developer, you’re guaranteed to learn something new. The book uses two e-commerce site examples—one based on selling physical products that require shipping and delayed payment, and another that sells non-physical products to be purchased and delivered instantly—so you see the widest possible range of e-commerce scenarios. In 11 engaging, easy-to-follow chapters, Effortless E-Commerce with PHP and MySQL teaches you how to:• Think of the customer first, in order to maximize sales• Create a safe server environment and database• Use secure transactions and prevent common vulnerabilities• Incorporate different payment gateways• Design scalable sites that are easy to maintain• Build administrative interfaces• Extend both examples to match the needs of your own sitesLarry Ullman is the president of Digital Media and Communications Insights, Inc., a firm specializing in information technology (www.dmcinsights.com). He is the author of several bestselling programming and Web development books, including PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide. Larry also writes articles on these subjects and teaches them in small and large group settings. Despite working with computers, programming languages, databases, and such since the early 1980s, Larry still claims he’s not a computer geek (but he admits he can speak their language).

IntroductionWhat is E-Commerce?About This BookTechnologies UsedGetting HelpWhat You'll NeedSome Fundamental SkillsA Web ServerAnd a Bit MorePart One: Fundamentals 1Chapter 1 Getting Started 2Identifying Your Business Goals 3Researching Legal Issues 4National and International Laws 4PCI Compliance 6Choosing Web Technologies 7Selecting a Web Host 8Hosting Options 9My Hosting Recommendation 12Finding a Good Host 12Using a Payment System 13Payment Processors 14Payment Gateways 15Which Should You Use? 16The Development Process 17Site Planning 18HTML Design 18Database Design 19Programming 21Testing 22Going Live 24Maintaining 24Improving 25Chapter 2 Security Fundamentals 26Security Theory 26No Web Site Is Secure 27Maximum Security Isn't the Goal 28Security for Customers 29PCI Requirements 31Server Security 33Hosting Implications 33PHP and Web Security 34Database Security 36Secure Transactions 38Common Vulnerabilities 40Protecting Information 40Protecting the User 41Protecting the Site 42Part Two: Selling Virtual Products 47Chapter 3 First Site: Structure and Design 48Database Design 49Server Organization 52Connecting to the Database 55The Coring File 57The HTML Template 61Creating the Header 63Adding Dynamic Functionality to the Header 64Creating the Footer 66Adding Dynamic Functionality to the Footer 68Creating the Home Page 70Chapter 4 User Accounts 72Defining Helper Functions 72Creating Form Inputs 73Protecting Passwords 77Redirecting the Browser 79Registration 81Creating the Basic Shell 82Creating the Form 83Processing the Form 84Logging In 91Processing the Form 91Creating the Form 94Logging Out 95Managing Passwords 96Recovering Passwords 97Changing Passwords 100Improving the Security 104Chapter 5 Managing Site Content 106Creating an Administrator 106Adding Pages 107Creating the Basic Script 108Adding a WYSIWYG Editor 112Displaying Page Content 115Creating category.php 115Creating page.php 118Adding PDFs 121Setting Up the Server 122Creating the PH P Script 123Displaying PDF Content 130Creating pdfs.php 130Creating view_pdf.php 132Chapter 6 Using PayPal 136About PayPal 136Payment Solutions 138Payment Buttons 139Testing PayPal 140Registering at the PayPal Sandbox 140Creating Test Accounts 141Creating a Button 143Integrating PayPal 145Updating the Registration Page 145Creating thanks.php 146Creating cancel.php 148Testing the Site 149Using IPN 150Enabling IPN 151Updating the Registration Script 151Creating the IPN Script 153Updating the Thanks Script 157Renewing Accounts 158Going Live 159Part Three: Selling Physical Products 161Chapter 7 Second Site: Structure and Design 162About the Site 162What's Being Sold 163No Customer Registration 164Implementing MVC 164Heightened Security 165Database Design 166Product Tables 166Customer Tables 167The SQL 169Server Setup 172Server Organization 172Customizing the Server Behavior 173Helper Files 179Connecting to the Database 179The Config File 180The HTML Tem plate 182Newer MySQL Features 185Prepared Statements 186Stored Procedures 188Chapter 8 Creating a Catalog 192Preparing the Database 192Populating the Tables Using SQL 193Looking at the Stored Procedure Queries 196Creating Stored Procedures 201Shopping by Category 204Creating the PHP Script 204Creating the View Files 206Listing Products 210Creating the PHP Script 210Creating the View Files 212Creating the "No Products" View 216Indicating Availability 217Showing Sale Prices 219Updating the Stored Procedure 220Updating product_functions.inc.php 222Updating list_products.html 223Updating list_coffees.html 224Highlighting Sales 224Creating the Home Page 225Creating the Sales Page 227Chapter 9 Building a Shopping Cart 230Defining the Procedures 230Adding Products 232Removing Products 232Updating the Cart 232Fetching the Cart's Contents 233Defining the Helper Functions 234Making a Shopping Cart 236Creating the PHP Script 236Creating the Views 240Making a Wish List 244Creating the PHP Script 244Creating the Views 245Calculating Shipping 247Chapter 10 Checking Out 250About Authorize.net 252Creating a Test Account 252Preparing the Site 253The New HTML Template 253The Helper Function 255Creating the Procedures 259Taking the Shipping Information 266Creating the PHP Script 267Creating the View Files 274Taking the Billing Information 282Creating the Basic PHP Script 283Creating the View File 284Validating the Form Data 288Processing Credit Cards 294Creating gateway_setup.php 294Defining gateway_process.php 296Examining the Server Response 298Updating billing.php 300Completing the Order 302Creating the PHP Script 303Creating the View File 304Testing the Site 306Going Live 307Chapter 11 Site Administration 308Setting Up the Server 309Requiring Authentication 309Creating a Template 310Using Superfish 313Updating create_form_input() 315Adding Products 316Adding Non-Coffee Products 316Adding Coffee Products 325Adding Inventory 331Creating Sales 335Viewing Orders 340Listing Every Order 341Viewing One Order 344Shipping Orders 349Creating gateway_setup_admin.php 349Updating view_order.php 350Index 354