
Learning PHP, MySQL, and JavaScript
Publisher: O'Reilly Media
Release Date: July 2009
Pages: 528
Read on O'Reilly Online Learning with a 10-day trial
Start your free trial now Buy on AmazonWhere’s the cart? Now you can get everything with O'Reilly Online Learning. To purchase books, visit Amazon or your favorite retailer. Questions? See our FAQ or contact customer service:
1-800-889-8969 / 707-827-7019
support@oreilly.com
Learning PHP, MySQL, and JavaScript explains each technology separately, shows you how to combine them, and introduces valuable web programming concepts, including objects, XHTML, cookies, and session management. You'll practice what you've learned with review questions in each chapter, and find a sample social networking platform built with the elements introduced in this book.
This book will help you:
- Understand PHP essentials and the basics of object-oriented programming
- Master MySQL, from database structure to complex queries
- Create web pages with PHP and MySQL by integrating forms and other HTML features
- Learn about JavaScript, from functions and event handling to accessing the Document Object Model
- Use libraries and packages, including the Smarty web template system, PEAR program repository, and the Yahoo! User Interface Library
- Make Ajax calls and turn your website into a highly dynamic environment
- Upload and manipulate files and images, validate user input, and secure your applications
Table of Contents
-
Chapter 1 Introduction to Dynamic Web Content
-
HTTP and HTML: Berners-Lee’s Basics
-
The Benefits of PHP, MySQL, and JavaScript
-
The Apache Web Server
-
About Open Source
-
Bringing It All Together
-
Test Your Knowledge: Questions
-
-
Chapter 2 Setting Up a Development Server
-
What Is a WAMP, MAMP, or LAMP?
-
Installing a WAMP on Windows
-
Installing a MAMP on Mac OS X
-
Installing a LAMP on Linux
-
Working Remotely
-
Using a Program Editor
-
Using an IDE
-
Test Your Knowledge: Questions
-
-
Chapter 3 Introduction to PHP
-
Incorporating PHP Within HTML
-
This Book’s Examples
-
The Structure of PHP
-
Test Your Knowledge: Questions
-
-
Chapter 4 Expressions and Control Flow in PHP
-
Expressions
-
Operators
-
Conditionals
-
Looping
-
Implicit and Explicit Casting
-
PHP Dynamic Linking
-
Test Your Knowledge: Questions
-
-
Chapter 5 PHP Functions and Objects
-
PHP Functions
-
Including and Requiring Files
-
PHP Version Compatibility
-
PHP Objects
-
Test Your Knowledge: Questions
-
-
Chapter 6 PHP Arrays
-
Basic Access
-
The foreach...as Loop
-
Multidimensional Arrays
-
Using Array Functions
-
Test Your Knowledge: Questions
-
-
Chapter 7 Practical PHP
-
Using printf
-
Date and Time Functions
-
File Handling
-
System Calls
-
XHTML
-
Test Your Knowledge: Questions
-
-
Chapter 8 Introduction to MySQL
-
MySQL Basics
-
Summary of Database Terms
-
Accessing MySQL via the Command Line
-
Indexes
-
MySQL Functions
-
Accessing MySQL via phpMyAdmin
-
Test Your Knowledge: Questions
-
-
Chapter 9 Mastering MySQL
-
Database Design
-
Normalization
-
Relationships
-
Transactions
-
Using EXPLAIN
-
Backing Up and Restoring
-
Test Your Knowledge: Questions
-
-
Chapter 10 Accessing MySQL Using PHP
-
Querying a MySQL Database with PHP
-
A Practical Example
-
Practical MySQL
-
Test Your Knowledge: Questions
-
-
Chapter 11 Form Handling
-
Building Forms
-
Retrieving Submitted Data
-
An Example Program
-
Test Your Knowledge: Questions
-
-
Chapter 12 Templating with Smarty
-
Why Smarty?
-
Installation
-
Creating Scripts
-
Creating Templates
-
A Practical Example
-
Test Your Knowledge: Questions
-
-
Chapter 13 Cookies, Sessions, and Authentication
-
Using Cookies in PHP
-
HTTP Authentication
-
Using Sessions
-
Test Your Knowledge: Questions
-
-
Chapter 14 Exploring JavaScript
-
JavaScript and HTML Text
-
Using Comments
-
Semicolons
-
Variables
-
Operators
-
Variable Typing
-
Functions
-
Global Variables
-
The Document Object Model
-
Test Your Knowledge: Questions
-
-
Chapter 15 Expressions and Control Flow in JavaScript
-
Expressions
-
Operators
-
The with Statement
-
Using onError
-
Using try...catch
-
Conditionals
-
Looping
-
Explicit Casting
-
Test Your Knowledge: Questions
-
-
Chapter 16 JavaScript Functions, Objects, and Arrays
-
JavaScript Functions
-
JavaScript Objects
-
JavaScript Arrays
-
Test Your Knowledge: Questions
-
-
Chapter 17 JavaScript and PHP Validation and Error Handling
-
Validating User Input with JavaScript
-
Regular Expressions
-
Redisplaying a Form After PHP Validation
-
Test Your Knowledge: Questions
-
-
Chapter 18 Using Ajax
-
What Is Ajax?
-
Using XMLHttpRequest
-
Test Your Knowledge: Questions
-
-
Chapter 19 Using YUI for Ajax and More
-
Choosing a Framework
-
Using YUI
-
Other Uses for YUI
-
Test Your Knowledge: Questions
-
-
Chapter 20 Bringing It All Together
-
Designing a Social Networking Site
-
On the Website
-
rnfunctions.php
-
rnheader.php
-
rnsetup.php
-
index.php
-
rnsignup.php
-
rnsignup.php (YUI version)
-
rncheckuser.php
-
rnlogin.php
-
rnprofile.php
-
rnmembers.php
-
rnfriends.php
-
rnmessages.php
-
rnlogout.php
-
-
Appendix Solutions to the Chapter Questions
-
Chapter 1 Answers
-
Chapter 2 Answers
-
Chapter 3 Answers
-
Chapter 4 Answers
-
Chapter 5 Answers
-
Chapter 6 Answers
-
Chapter 7 Answers
-
Chapter 8 Answers
-
Chapter 9 Answers
-
Chapter 10 Answers
-
Chapter 11 Answers
-
Chapter 12 Answers
-
Chapter 13 Answers
-
Chapter 14 Answers
-
Chapter 15 Answers
-
Chapter 16 Answers
-
Chapter 17 Answers
-
Chapter 18 Answers
-
Chapter 19 Answers
-
-
Appendix Online Resources
-
PHP Resource Sites
-
MySQL Resource Sites
-
JavaScript Resource Sites
-
Ajax Resource Sites
-
Miscellaneous Resource Sites
-
O’Reilly Resource Sites
-
-
Appendix MySQL’s FULLTEXT Stopwords
-
Appendix MySQL Functions
-
String Functions
-
Date Functions
-
Time Functions
-
-
Appendix Using PEAR and PHPUnit
-
Installation
-
Creating a Connect Instance
-
Rewriting to Use PEAR
-
Adding Other PEAR Packages
-
Unit Testing with PHPUnit
-
-
Colophon