Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Author
About the Technical Reviewer
Acknowledgments
Introduction
Chapter 1: Create and Test a MySQL Database and Table
Defining the Term Database
Defining Developer, Administrator, and User
Defining Interactive Web Sites
Only Use MySQL for Interactive Database Tables
Methods for Developing and Maintaining Databases
A Brief Look Inside the Machinery
A Free Development Platform for Testing
Using XAMPP on Your Own Computer
Will I Be Able to Transfer the Database from XAMPP to a Remote Host?
Download and Install XAMPP
Accessing phpMyAdmin Using XAMPP
Planning a Database: The Essential First Step
Create a Database Using phpMyAdmin
Create a Table Using phpMyAdmin
The SQL Alternative
Deleting Databases and Tables
Summary
Chapter 2: Create Web Pages That Interact with Users
Create the Folder for Holding the Database Pages
Create the Temporary Template
Introducing the PHP include() Function
The Included Header File
The Included Menu File
The Included Information Column
The Included Footer File
Styling the Temporary Template
The Interactive Version of the Template
Connecting to the Database
Explanation of the Code
The Registration Page
The PHP Keyword echo
Styling the Form Fields
Sticky Forms
Explanation of the Code
The Thank You Page
Displaying Error Messages That Are Collected in an Array
Viewing Members’ Records
The View Users Page
Explanation of the Code
The Change Password Page
Explanation of the Code
Confirming a Successful Password Change
Dealing with an Apostrophe
Tutorial Dealing with the Apostrophe
Apostrophes Within PHP code
Testing the Tutorial’s Pages
More About Arrays
Summary
Chapter 3: Login/Logout for Members and an Administrator
Create the Logindb Database and Table
Tidy the Styling
Remove or Replace Redundant Menu Buttons in the Headers
Add a Login Button to the Home Page Header
Remove Redundant Buttons from the Registration and New Password Headers
The Revised Registration Page
The New Header for the New Password Page
A New Header Menu for the Members’ Page
Amend the Header for the Thank-You Page
The Registration Page and Undesirable Characters
Register Some Members
Differentiating Between Two Types of Membership
Create User Levels to Limit Access to Private Pages
Log In
The Header for the Login Page
The Login Page
Explanation of the Code
The Login Form Fields
Sessions
A Members-only Page
Explanation of the Code
Planning the Administrator’s Role
A New Header for the Administration Page
The Administrator’s Page
Explanation of the Code
The Logout Page
Explanation of the Code
Testing the Login/logout Function
Amending and Deleting Individual Records
Summary
Chapter 4: Display Membership Tables for the Administrator
The Administration Database
The Users Table
The Revised Administration Page
Explanation of the Code
Revising the View Users Page to Include Editing and Deleting
Explanation of the Code
Displaying Pages of Records (Pagination)
Explanation of the Code
Planning the Search Criteria
A Temporary Page for Displaying Specified Members
Explanation of the Code
The Search Form
Explanation of the Code
The Final Form Handler for Receiving Search Form Input
Editing Records
Explanation of the Code
Deleting Records
Explanation of the Code
Summary
Chapter 5: Register Addresses and Phone Numbers
Create a New Database and a Table with 17 Columns
Create the File for Connecting to the Database
Create the Table
Using ENUM
The Importance of Documentation
Extend the Registration Form, and Add a Pull-down Menu
Always Announce Prices and Fee Payments Up Front
Explanation of the Code
Sticky Fields for a Pull-down Menu
Add PayPal Debit/Credit Card Images
The Header for the Registration Page
Include PayPal on the Thank You Page
Explanation of the Code
Register Some Members
A Small Amendment to the Login Page
Amend the Administrator’s Header
Apply Pagination to the admin_view_users Table
Explanation of the Code
Searching and Editing Records
Explanation of the Code
Modify the Form for Editing Records
Searching for Members’ Addresses and Phone Numbers
Summary
Chapter 6: The Finishing Touches
Create the Database
Create the File for Connecting to the Database
Create the Table by Importing an SQL Dump File
If you wish to Create the Table Manually
Registering Some Members Manually
Tidy the Folders and Filing System
The Style Sheet
Degrees of Security
The Minimum Layer of Security
An Increased Layer of Security
Validation and Sanitization
The filter_var( ) Function
Validation
Explanation of the Code
Sanitization
Text Areas and Sanitization
Validating Telephone Numbers
A More Secure Registration Page
Explanation of the Code
Search for an Address and Telephone Number
Viewing the Retrieved Address and Phone Number
Explanation of the Code
Edit Addresses and Telephone Numbers
Explanation of the Code
Summary
Chapter 7: Migrating to a Host and Backing Up Your Web Site Database
Making Last-Minute Changes
Create a New Database
Displaying the Members’ Titles in the Paginated Table
Allow Members to Update Their Own Records
Safe E-mailing
A Minor Problem
A Secure Feedback Form
The Feedback Form
The Style Sheets for the Feedback Form
The Thank You Page and the Error Messages
Migrating the Database and Tables to a Remote Host
A Puzzling Error Message
Creating and Exporting the SQL File
Using the GUIs on a Remote Host’s Server
Connecting to the Database on the Remote Host
Securely Upload the mysqli_connect.php File
Uploading the Interactive Pages to the Host
Back Up Your Database
Summary
Chapter 8: Creating a Product Catalog
Prepare the Database and Administration Plan
Create a New Database
Create the File for Connecting to the Database
Security
Creating a Home Page with Search Capability
The Header for the Majority of the Pages
The Home Page Code
Displaying the Catalog
Explanation of the Code
The Header for the Page of Search Results
Creating the Admin/Add a House Page
The Header for the Administrator’s Page
The Header with Two Extra Buttons
Administrator’s View of the Entire Stock of Houses for Sale
The Administrator’s Search Page
The Result of a Search
Displaying the Full Description of a House
Explanation of the Code
The Contact Us Page
Summary
Chapter 9: Adding Multiple Tables and Other Enhancements
Introduction to Multiple Tables
Normalization
Create the Database and Tables
View the Connection File
Preparing the Tables for Joining
Add Some Data
Joins
The Home Page for the Multiple Tables Tutorial
The Main Menu for the Home Page
Payments by Check
A Choice of Payment Method
Printing Online Forms
Explanation of the Code
Summary
Chapter 10: Creating a Message Board
The Plan
Create the Database
Create the Tables
Create the Template for the Message Board Web Site
Create the Registration Form
The Thank You Page
Register Some Members
The Login Page
Logging Out
Creating a Gateway to the Two Categories of Quotes
The Form for Posting Quotations
Explanation of the Code
Processing the Postings
Explanation of the Code
Post Some Quotations
The Home Page
Explanation of the Code
The Comical Quotes Page
The Wise Quotes Page
Adding Search Facilities
Explanation of the Code
The Header for View Posts.php
Search for Specific Words or Phrases
Preparing the Table for Full Text Searches
The Full Text Search Form
Displaying the Search Results
Explanation of the Code
The Header for the quotes_found Page
Enhancing the Message Board
Converting the Message Board to a Forum
Summary
Chapter 11: E-Commerce: A Brief Introduction
Items Common to Both Shopping Carts
Security Warning
The Plan
The Home Page
Registering Users
The Login Page with a Forgotten-Password Link
Retrieving a Forgotten Password
Administration
Creating the Administration Page
Searching and Displaying Products
Features Applicable Only to the PayPal Shopping Cart
Integrating with the PayPal Shopping Cart
Displaying the Result of a Search
A Custom Shopping Cart
The Database and Tables
The Tables
Add Paintings to a Table for a Custom Shopping Cart
Displaying the Products Using Custom Shopping Cart Links
Adding Purchases to the Cart
The Checkout Page
Additional Administrative Tasks
Summary
Chapter 12: Troubleshooting Your Database-Driven Web Site
HTML Code Errors
Browser Quirks
A Style Change Has No Effect
A Page Fails to Validate
A PayPal Pull-Down Menu Does Not Work
PHP Script Errors
Included Items Missing from the Display
Call to an Undefined Function
Cannot Redeclare Function
Undefined Index or Undefined Variable
Empty Variable Value
General Variable Errors
Headers Already Sent
Blank Screen
Unexpected End of File in Line xxx
Common PHP Parse Errors
Unexpected T_STRING
Unexpected T_ELSE
Wrong Equals Sign
Failed to Open Stream
Warning: Division by Zero
Display Is Not What Was Expected
MySQL Errors
Table Displays Headings Only
Access Denied
Syntax Errors
Reference to a Primary Key Could Not be Created
Summary
Appendix
PHP Quick Reference
Arrays
Associative Arrays
Comments
Concatenation
Constants
E-mailing with PHP
Functions
include( ) vs. require( )
if, else, and elseif
Loops
Numbers
Quotation Marks
Sessions
Ternary Operator
Validation and Sanitization Filters
Variables
MySQL and phpMyAdmin Quick Reference
INSERT
SELECT
UPDATE
Storage Engines and phpMyAdmin
Changing the Storage Engine on an Existing Populated Table
What Next?
Resources for PHP and MySQL
HTML and PHP Editing Software
PHP and MySQL Internet Resources
Resource for Creating a Forum
E-Commerce Resources
Online Tutorials
Integrating PayPal with a Custom Shopping Cart
PayPal Forums
Third-Party Shopping Carts
Summary
Index
← Prev
Back
Next →
← Prev
Back
Next →