By: Robin Nixon
Publisher:O'Reilly Media
Formats:Print Ebook Safari Books Online
Print: August 2012
Ebook: August 2012
Pages: 586
Print ISBN:978-1-4493-1926-7 | ISBN 10:1-4493-1926-2Ebook ISBN:978-1-4493-3747-6 | ISBN 10:1-4493-3747-3
Description
Learn how to build interactive, data-driven websites—even if you don’t have any previous programming experience. If you know how to build static sites with HTML, this popular guide will help you tackle dynamic web programming. You’ll get a thorough grounding in today’s core open source technologies: PHP, MySQL, JavaScript, and CSS.Explore each technology separately, learn how to combine them, and pick up valuable web programming concepts along the way, including objects, XHTML, cookies, and session management. This book provides review questions in each chapter to help you apply what you’ve learned.
- Learn 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 JavaScript fundamentals, from functions and event handling to accessing the Document Object Model
- Pick up CSS basics for formatting and styling your web pages
- Turn your website into a highly dynamic environment with Ajax calls
- Upload and manipulate files and images, validate user input, and secure your applications
- Explore a working example that brings all of the ingredients together
Table of Contents
Chapter 1 Introduction to Dynamic Web ContentHTTP and HTML: Berners-Lee’s Basics
The Benefits of PHP, MySQL, JavaScript, and CSS
The Apache Web Server
About Open Source
Bringing It All Together
Test Your Knowledge
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
Questions
Chapter 3 Introduction to PHP
Incorporating PHP Within HTML
This Book’s Examples
The Structure of PHP
Test Your Knowledge
Chapter 4 Expressions and Control Flow in PHP
Expressions
Operators
Conditionals
Looping
Implicit and Explicit Casting
PHP Dynamic Linking
Test Your Knowledge
Chapter 5 PHP Functions and Objects
PHP Functions
Including and Requiring Files
PHP Version Compatibility
PHP Objects
Test Your Knowledge
Chapter 6 PHP Arrays
Basic Access
The foreach...as Loop
Multidimensional Arrays
Using Array Functions
Test Your Knowledge
Chapter 7 Practical PHP
Using printf
Date and Time Functions
File Handling
System Calls
XHTML
Test Your Knowledge
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
Chapter 9 Mastering MySQL
Database Design
Normalization
Relationships
Transactions
Using EXPLAIN
Backing Up and Restoring
Test Your Knowledge
Chapter 10 Accessing MySQL Using PHP
Querying a MySQL Database with PHP
A Practical Example
Practical MySQL
Test Your Knowledge
Chapter 11 Form Handling
Building Forms
Retrieving Submitted Data
An Example Program
Test Your Knowledge
Chapter 12 Cookies, Sessions, and Authentication
Using Cookies in PHP
HTTP Authentication
Using Sessions
Test Your Knowledge
Chapter 13 Exploring JavaScript
JavaScript and HTML Text
Using Comments
Semicolons
Variables
Operators
Variable Typing
Functions
Global Variables
The Document Object Model (DOM)
Test Your Knowledge
Chapter 14 Expressions and Control Flow in JavaScript
Expressions
Operators
The with Statement
Using onerror
Using try...catch
Conditionals
Looping
Explicit Casting
Test Your Knowledge
Chapter 15 JavaScript Functions, Objects, and Arrays
JavaScript Functions
JavaScript Objects
JavaScript Arrays
Test Your Knowledge
Chapter 16 JavaScript and PHP Validation and Error Handling
Validating User Input with JavaScript
Regular Expressions
Redisplaying a Form After PHP Validation
Test Your Knowledge
Chapter 17 Using Ajax
What Is Ajax?
Using XMLHttpRequest
Implementing Ajax via POST Requests
Using GET Instead of POST
Sending XML Requests
Using Frameworks for Ajax
Test Your Knowledge
Chapter 18 Introduction to CSS
Importing a Style Sheet
Embedded Style Settings
CSS Rules
Style Types
CSS Selectors
The CSS Cascade
The Difference Between <div> and <span>
Measurements
Fonts and Typography
Managing Text Styles
CSS Colors
Positioning Elements
Pseudoclasses
Pseudoelements
Shorthand Rules
The Box Model and Layout
Test Your Knowledge
Chapter 19 Advanced CSS with CSS3
Attribute Selectors
The box-sizing Property
CSS3 Backgrounds
CSS3 Borders
Box Shadows
Element Overflow
Multicolumn Layout
Colors and Opacity
Text Effects
Web Fonts
Transformations
Transitions
Test Your Knowledge
Chapter 20 Accessing CSS from JavaScript
Revisiting the getElementById Function
Accessing CSS Properties from JavaScript
Inline JavaScript
Adding New Elements
Using Interrupts
Test Your Knowledge
Chapter 21 Bringing It All Together
Designing a Social Networking Site
On the Website
functions.php
header.php
setup.php
index.php
signup.php
checkuser.php
login.php
profile.php
members.php
friends.php
messages.php
logout.php
styles.css
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
Chapter 20 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
Colophon
Download
DepositfilesBy: Shahen Gasparyan
No comments:
Post a Comment