Topic: PHP/MySQL

PHP and MySQL: Create - Modify - Reuse (0470192429) cover image

PHP and MySQL: Create - Modify - Reuse

Timothy Boronczyk with Martin E. Psinas
ISBN: 978-0-470-19242-9
Paperback
341 pages
May 2008
This title is out-of-print and not currently available for purchase from this site.
About This Title  |  Download Code  |  Errata  |  P2P Forum for This Title

Introduction xi

Chapter 1: User Registration 1

Plan the Directory Layout 1

Planning the Database 2

Writing Shared Code 3

User Class 5

CAPTCHA 9

Templates 11

Registering a New User 12

E-mailing a Validation Link 17

Logging In and Out 21

Changing Information 25

Forgotten Passwords 28

Summary 30

Chapter 2: Community Forum 31

Design of the Forum 31

Designing the Database 32

Working with Permissions and Bitwise Operators 33

Updating the User Class 35

Code and Code Explanation 40

Adding Forums 41

Adding Posts 43

Displaying Forums and Posts 47

Pagination 55

Avatars 56

BBCode 59

Summary 62

Chapter 3: Mailing List 63

Design of the Mailing List 63

Choosing POP3 64

Designing the Database 65

Code and Code Explanation 66

The POP3 Client 66

The Configuration File 73

Account Management 73

Processing Messages 79

Processing the Digest 83

Setting Up the Mailing List 83

Summary 86

Chapter 4: Search Engine 87

Designing the Search Engine 87

Problems with Full-Text Search 88

Designing the Database 89

Code and Code Explanation 91

Administrative Interface 91

Crawler/Indexer 98

Front End 104

Summary 110

Chapter 5: Personal Calendar 113

Designing the Application 113

Designing the Database 114

Code and Code Explanation 115

Creating a Month-View Calendar 115

Creating a Day-View Calendar 120

Adding and Showing Events 121

Sending Reminders 129

Exporting the Calendar 130

Summary 135

Chapter 6: Ajax File Manager 137

Design of the Ajax File Manager 137

JavaScript and Ajax 138

The XMLHttpRequest Object 139

Code and Code Explanation 142

Main Interface 143

Client-Side Functionality 147

Server-Side Functionality 160

Summary 175

Chapter 7: Online Photo Album 177

Design of the Online Photo Album 177

Code and Code Explanation 178

Views 178

Helper Files 188

QuickTime Thumbnails 190

Thumbnail Caching 192

Summary 193

Chapter 8: Shopping Cart 195

Designing the Shopping Cart 195

Designing the Database 196

Code and Code Explanation 197

The ShoppingCart Class 197

Working with the Shopping Cart 201

Building the Storefront 209

Adding Inventory 217

Summary 238

Chapter 9: Web Site Statistics 239

Determining What to Collect 239

Designing the Database 241

Obtaining Data 242

Code and Code Explanation 244

Pie Chart 244

Bar Chart 248

The Report 253

Summary 264

Chapter 10: News/Blog System 265

Tables 265

Adding Posts 267

Generating the RSS 278

Displaying Posts 282

Adding Comments 285

Summary 289

Chapter 11: Shell Scripts 291

Designing the Script 292

General Shell Scripting Advice 293

Code and Code Explanation 294

The CommandLine Class 294

startproject 303

The Skeleton 313

Summary 314

Chapter 12: Security and Logging 315

Cross-Site Scripting 315

Path Traversal 318

Injection 320

SQL Injection 320

Command Injection 324

Weak Authentication 325

Logging 327

Preventing Accidental Deletes 330

Summary 332

Index 333