HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
For every developer who wants to build production-quality applications using PHP and MySQL.
In this one-of-a-kind video package, top Web developer and Prentice Hall author Marc Wandschneider shows you exactly how to build reliable, secure, industrial-strength Web applications with PHP and MySQL. You’ll master both PHP and MySQL through 18 comprehensive video lessons, and you’ll have your first PHP/MySQL application running in less than an hour.
Wandschneider shows how to set up PHP on Windows and Mac OS X and then builds your skills by walking you through actual application development projects. Just click, watch, and learn efficient ways to implement user account creation, form validation, cookie and session management, file upload/download, and much more.
Everything’s taught visually, using sample applications ranging from a simple calculator to a full-fledged photo sharing site, and all the sample code is on the DVD. Programming challenges at the end of each lesson teach you how to take your skills to the next level. You’ll master essential PHP and MySQL best practices at your own pace and learn how to deliver production-quality PHP/MySQL solutions faster and more effectively.
LiveLessons: Video Instruction from Technology Experts
Looking for a better way to master today’s rapidly changing technologies? Want expert help, but don’t have the time or energy to read a book? Can’t find classroom training worth the money? Discover LiveLessons: self-paced, personal video instruction from the world’s leading experts.
Download the code for a PC (ZIP)
Download the code for a Mac (SITX)
Click to view the companion booklet or right-click and select Save Link As... to download it
PHP and MySQL: Language Features
Lesson 1: Installation of MySQL, Apache, and PHP 1
Windows 1
Mac / Unix 2
Lesson 2: Your First Web Application 7
Getting Started 7
Entering PHP Scripts 8
Variables 11
Variables 11
Working with Multiple Pages 13
Lesson 3: Language Basics 15
Arrays 15
Testing Variables 15
Simple Variable Substitution 16
Arithmetic Operators 16
Type Conversions 17
NULL 18
The if Statement 18
Comparison Operators: Equality and Identity 18
Lesson 4: More Language Features 21
Script Lifetime 21
Strings, Newlines, and the Web Browser 21
Constants 22
More Comparison Operators 22
Logical Operators 22
The switch Statement 23
Lesson 5: Functions and Loops 25
Loops 25
Functions 26
Byval and Byref Parameters 27
Scoping 28
Lesson 6: Text and Strings 29
Review of Strings in PHP 29
More on Variable Expansion 30
String Operators 30
Common Operations and Functions for Strings 31
Sending Data via GET Parameters 33
PHP and Unicode 33
Lesson 7: Arrays, File Organization 35
Review of Array Basics 35
Multidimensional Arrays 36
Counting Array Elements 36
Removing and Deleting 36
Iterating over Array Contents — foreach Loops 36
Common Array Operations 37
File Inclusion 38
Lesson 8: Object-Oriented Programming I 39
Declaring New Types 39
Constructors 41
Access Levels 41
Lesson 9: Object-Oriented Programming II 43
Better Code Reuse with Inheritance 43
Further Refining Our Objects 44
Lesson 10: Object-Oriented Programming III 47
Class Constants 47
Static Class Data 48
Static Methods 48
Operations on Objects 48
Structured Exception Handling 50
Lesson 11: Learning about the Web Server 53
More FORM Elements 53
POST vs. GET 54
The $_SERVER superglobal 56
FORM Security 58
More on Processing Forms 58
Serializing Objects 60
Lesson 12: Getting Started with the Database 61
Getting to MySQL 61
Creating Our Database 62
Creating a Database User 62
Creating the First Table 62
Inserting Data into Tables 64
Wrecking Things 64
Working with MySQL from within PHP 64
Securing User Data 65
Lesson 13: Fetching Data from the Database 67
Retrieving Data 67
More on Query Expressions: Functions 68
Sorting Result Sets 69
Fetching Subsets of the Result Sets 69
Modifying a Table 69
Lesson 14: Modifying Data in the Database 71
Modifying Rows in Our Tables 71
Deleting Rows from a Table 71
FULLTEXT Indexes 72
Joining Fetches 72
Transacting Queries 73
Using Hidden Fields on Forms 74
Lesson 15: Remembering Things: Cookies and Sessions 77
Carrying Information across Page Requests: Cookies 77
Sessions 79
FULLTEXT Searching in MySQL 81
Lesson 16: Files and File Uploads 83
Uploading User Files 83
File Functions 87
Browsing Directories 89
Lesson 17: Formatted Output, Output Buffering, and Security 91
Formatting Strings with printf and sprintf 91
Date and Time Functions 93
Output Buffering 96
Lesson 18: When Things Go Wrong 99
Errors in PHP 99
Handling Errors 100
Debugging with Xdebug 101