| Introduction |
|
1 | (4) |
| Part I: Web Application Basics |
|
|
Chapter 1 Understanding How the Web Works |
|
|
5 | (20) |
|
A Brief History of HTML and the World Wide Web |
|
|
6 | (1) |
|
|
|
7 | (1) |
|
Understanding Web Content Delivery |
|
|
7 | (3) |
|
Selecting a Web Hosting Provider |
|
|
10 | (2) |
|
Testing with Multiple Web Browsers |
|
|
12 | (1) |
|
|
|
13 | (1) |
|
Using FTP to Transfer Files |
|
|
14 | (5) |
|
Understanding Where to Place Files on the Web Server |
|
|
19 | (3) |
|
|
|
22 | (1) |
|
|
|
22 | (1) |
|
|
|
23 | (2) |
|
Chapter 2 Structuring HTML and Using Cascading Style Sheets |
|
|
25 | (50) |
|
Getting Started with a Simple Web Page |
|
|
26 | (3) |
|
HTML Tags Every Web Page Must Have |
|
|
29 | (2) |
|
Using Hyperlinks in Web Pages |
|
|
31 | (2) |
|
Organizing a Page with Paragraphs and Line Breaks |
|
|
33 | (3) |
|
Organizing Your Content with Headings |
|
|
36 | (3) |
|
Understanding Semantic Elements |
|
|
39 | (12) |
|
|
|
51 | (3) |
|
|
|
54 | (5) |
|
|
|
59 | (5) |
|
|
|
64 | (2) |
|
|
|
66 | (1) |
|
Internal Style Sheets and Inline Styles |
|
|
66 | (3) |
|
|
|
69 | (2) |
|
|
|
71 | (1) |
|
|
|
72 | (3) |
|
Chapter 3 Understanding the CSS Box Model and Positioning |
|
|
75 | (32) |
|
|
|
76 | (3) |
|
The Whole Scoop on Positioning |
|
|
79 | (5) |
|
Controlling the Way Things Stack Up |
|
|
84 | (2) |
|
Managing the Flow of Text |
|
|
86 | (1) |
|
Understanding Fixed Layouts |
|
|
87 | (2) |
|
Understanding Fluid Layouts |
|
|
89 | (3) |
|
Creating a Fixed/Fluid Hybrid Layout |
|
|
92 | (11) |
|
Considering a Responsive Web Design |
|
|
103 | (1) |
|
|
|
104 | (1) |
|
|
|
105 | (1) |
|
|
|
105 | (2) |
|
Chapter 4 Introducing JavaScript |
|
|
107 | (20) |
|
Learning Web Scripting Basics |
|
|
108 | (1) |
|
How JavaScript Fits into a Web Page |
|
|
109 | (2) |
|
Exploring JavaScript's Capabilities |
|
|
111 | (1) |
|
Basic JavaScript Language Concepts |
|
|
112 | (6) |
|
|
|
118 | (1) |
|
|
|
119 | (1) |
|
Best Practices for JavaScript |
|
|
120 | (1) |
|
|
|
121 | (1) |
|
Using the JavaScript Console to Debug JavaScript |
|
|
122 | (2) |
|
|
|
124 | (1) |
|
|
|
124 | (1) |
|
|
|
125 | (2) |
|
Chapter 5 Introducing PHP |
|
|
127 | (12) |
|
How PHP Works with a Web Server |
|
|
127 | (1) |
|
The Basics of PHP Scripts |
|
|
128 | (6) |
|
Code Blocks and Browser Output |
|
|
134 | (2) |
|
|
|
136 | (1) |
|
|
|
137 | (1) |
|
|
|
137 | (2) |
| Part II: Getting Started with Dynamic Websites |
|
|
Chapter 6 Understanding Dynamic Websites and HTML5 Applications |
|
|
139 | (36) |
|
Refresher on the Different Types of Scripting |
|
|
140 | (1) |
|
Displaying Random Content on the Client Side |
|
|
140 | (4) |
|
Understanding the Document Object Model |
|
|
144 | (1) |
|
|
|
145 | (1) |
|
Working with the document Object |
|
|
146 | (3) |
|
Accessing Browser History |
|
|
149 | (2) |
|
Working with the location Object |
|
|
151 | (1) |
|
More About the DOM Structure |
|
|
152 | (3) |
|
|
|
155 | (2) |
|
Creating Positionable Elements (Layers) |
|
|
157 | (5) |
|
Hiding and Showing Objects |
|
|
162 | (2) |
|
Modifying Text Within a Page |
|
|
164 | (2) |
|
|
|
166 | (2) |
|
Changing Images Based on User Interaction |
|
|
168 | (2) |
|
Thinking Ahead to Developing HTML5 Applications |
|
|
170 | (1) |
|
|
|
171 | (1) |
|
|
|
172 | (1) |
|
|
|
172 | (3) |
|
Chapter 7 JavaScript Fundamentals: Variables, Strings, and Arrays |
|
|
175 | (22) |
|
|
|
175 | (4) |
|
Understanding Expressions and Operators |
|
|
179 | (1) |
|
|
|
180 | (1) |
|
Converting Between Data Types |
|
|
181 | (1) |
|
|
|
182 | (3) |
|
|
|
185 | (3) |
|
|
|
188 | (1) |
|
|
|
189 | (2) |
|
|
|
191 | (3) |
|
|
|
194 | (1) |
|
|
|
195 | (1) |
|
|
|
195 | (2) |
|
Chapter 8 JavaScript Fundamentals: Functions, Objects, and Flow Control |
|
|
197 | (42) |
|
|
|
198 | (5) |
|
|
|
203 | (2) |
|
Using Objects to Simplify Scripting |
|
|
205 | (5) |
|
Extending Built-in Objects |
|
|
210 | (2) |
|
|
|
212 | (1) |
|
Working with Math Methods |
|
|
213 | (3) |
|
|
|
216 | (3) |
|
|
|
219 | (3) |
|
Using Shorthand Conditional Expressions |
|
|
222 | (1) |
|
Testing Multiple Conditions with if and else |
|
|
223 | (2) |
|
Using Multiple Conditions with switch |
|
|
225 | (2) |
|
|
|
227 | (2) |
|
|
|
229 | (1) |
|
|
|
230 | (1) |
|
|
|
231 | (1) |
|
Looping Through Object Properties |
|
|
232 | (4) |
|
|
|
236 | (1) |
|
|
|
236 | (1) |
|
|
|
237 | (2) |
|
Chapter 9 Understanding JavaScript Event Handling |
|
|
239 | (22) |
|
Understanding Event Handlers |
|
|
239 | (5) |
|
|
|
244 | (4) |
|
|
|
248 | (2) |
|
Using the load and unload Events |
|
|
250 | (1) |
|
Using click to Change a <div>'s Appearance |
|
|
251 | (7) |
|
|
|
258 | (1) |
|
|
|
258 | (1) |
|
|
|
258 | (3) |
|
Chapter 10 The Basics of Using jQuery |
|
|
261 | (18) |
|
Using Third-Party JavaScript Libraries |
|
|
261 | (2) |
|
jQuery Arrives on the Scene |
|
|
263 | (1) |
|
|
|
264 | (1) |
|
Becoming Familiar with the $().ready Handler |
|
|
265 | (2) |
|
Selecting DOM and CSS Content |
|
|
267 | (1) |
|
Manipulating HTML Content |
|
|
267 | (5) |
|
Putting the Pieces Together to Create a jQuery Animation |
|
|
272 | (3) |
|
Handling Events with jQuery |
|
|
275 | (1) |
|
|
|
276 | (1) |
|
|
|
277 | (1) |
|
|
|
277 | (2) |
| Part III: Taking Your Web Applications to the Next Level |
|
|
Chapter 11 AJAX: Remote Scripting |
|
|
279 | (20) |
|
|
|
279 | (3) |
|
|
|
282 | (1) |
|
Creating a Simple AJAX Library |
|
|
283 | (2) |
|
Creating an AJAX Quiz Using the Library |
|
|
285 | (5) |
|
Debugging AJAX-Based Applications |
|
|
290 | (5) |
|
Using jQuery's Built-in Functions for AJAX |
|
|
295 | (1) |
|
|
|
296 | (1) |
|
|
|
296 | (1) |
|
|
|
296 | (3) |
|
Chapter 12 PHP Fundamentals: Variables, Strings, and Arrays |
|
|
299 | (28) |
|
|
|
299 | (3) |
|
|
|
302 | (5) |
|
Using Expressions and Operators |
|
|
307 | (8) |
|
|
|
315 | (2) |
|
|
|
317 | (1) |
|
|
|
318 | (4) |
|
Some Array-Related Constructs and Functions |
|
|
322 | (2) |
|
|
|
324 | (1) |
|
|
|
324 | (1) |
|
|
|
325 | (2) |
|
Chapter 13 PHP Fundamentals: Functions, Objects, and Flow Control |
|
|
327 | (40) |
|
|
|
328 | (2) |
|
|
|
330 | (2) |
|
Returning Values from User-Defined Functions |
|
|
332 | (1) |
|
Understanding Variable Scope |
|
|
333 | (3) |
|
Saving State Between Function Calls with the static Statement |
|
|
336 | (2) |
|
|
|
338 | (3) |
|
Testing for the Existence of a Function |
|
|
341 | (2) |
|
|
|
343 | (5) |
|
|
|
348 | (2) |
|
|
|
350 | (6) |
|
|
|
356 | (8) |
|
|
|
364 | (1) |
|
|
|
365 | (1) |
|
|
|
365 | (2) |
|
Chapter 14 Working with Cookies and User Sessions |
|
|
367 | (18) |
|
|
|
367 | (2) |
|
|
|
369 | (4) |
|
|
|
373 | (1) |
|
Overview of Server-Side Sessions |
|
|
373 | (1) |
|
Working with Session Variables |
|
|
374 | (6) |
|
Destroying Sessions and Unsetting Session Variables |
|
|
380 | (1) |
|
Using Sessions in an Environment with Registered Users |
|
|
380 | (2) |
|
|
|
382 | (1) |
|
|
|
382 | (1) |
|
|
|
383 | (2) |
|
Chapter 15 Working with Web-Based Forms |
|
|
385 | (40) |
|
|
|
385 | (1) |
|
|
|
386 | (4) |
|
|
|
390 | (1) |
|
Naming Each Piece of Form Data |
|
|
391 | (1) |
|
Labeling Each Piece of Form Data |
|
|
392 | (1) |
|
|
|
393 | (1) |
|
Exploring Form Input Controls |
|
|
394 | (8) |
|
Using HTML5 Form Validation |
|
|
402 | (2) |
|
|
|
404 | (2) |
|
Accessing Form Elements with JavaScript |
|
|
406 | (2) |
|
Accessing Form Elements with PHP |
|
|
408 | (6) |
|
Using Hidden Fields to Save State in Dynamic Forms |
|
|
414 | (2) |
|
Sending Mail on Form Submission |
|
|
416 | (4) |
|
|
|
420 | (2) |
|
|
|
422 | (1) |
|
|
|
423 | (2) |
| Part IV: Integrating a Database Into Your Applications |
|
|
Chapter 16 Understanding the Database Design Process |
|
|
425 | (12) |
|
The Importance of Good Database Design |
|
|
425 | (1) |
|
Types of Table Relationships |
|
|
426 | (5) |
|
Understanding Normalization |
|
|
431 | (3) |
|
Following the Design Process |
|
|
434 | (1) |
|
|
|
435 | (1) |
|
|
|
436 | (1) |
|
|
|
436 | (1) |
|
Chapter 17 Learning Basic SQL Commands |
|
|
437 | (50) |
|
Learning the MySQL Data Types |
|
|
437 | (4) |
|
Learning the Table-Creation Syntax |
|
|
441 | (1) |
|
Using the INSERT Statement |
|
|
442 | (2) |
|
Using the SELECT Statement |
|
|
444 | (3) |
|
Using WHERE in Your Queries |
|
|
447 | (2) |
|
Selecting from Multiple Tables |
|
|
449 | (6) |
|
Using the UPDATE Statement to Modify Records |
|
|
455 | (3) |
|
Using the REPLACE Statement |
|
|
458 | (1) |
|
Using the DELETE Statement |
|
|
459 | (2) |
|
Frequently Used String Functions in MySQL |
|
|
461 | (9) |
|
Using Date and Time Functions in MySQL |
|
|
470 | (12) |
|
|
|
482 | (2) |
|
|
|
484 | (1) |
|
|
|
485 | (2) |
|
Chapter 18 Interacting with MySQL Using PHP |
|
|
487 | (14) |
|
|
|
487 | (1) |
|
Connecting to MySQL with PHP |
|
|
487 | (4) |
|
|
|
491 | (8) |
|
|
|
499 | (1) |
|
|
|
499 | (1) |
|
|
|
499 | (2) |
| Part V: Getting Started with Application Development |
|
|
Chapter 19 Creating a Simple Discussion Forum |
|
|
501 | (22) |
|
Designing the Database Tables |
|
|
501 | (1) |
|
Creating an Include File for Common Functions |
|
|
502 | (1) |
|
Creating the Input Forms and Scripts |
|
|
503 | (4) |
|
Displaying the Topic List |
|
|
507 | (3) |
|
Displaying the Posts in a Topic |
|
|
510 | (4) |
|
|
|
514 | (4) |
|
Modifying the Forum Display with JavaScript |
|
|
518 | (2) |
|
|
|
520 | (1) |
|
|
|
520 | (1) |
|
|
|
520 | (3) |
|
Chapter 20 Creating an Online Storefront |
|
|
523 | (18) |
|
Planning and Creating the Database Tables |
|
|
523 | (4) |
|
Displaying Categories of Items |
|
|
527 | (4) |
|
|
|
531 | (3) |
|
Using JavaScript with an Online Storefront |
|
|
534 | (4) |
|
|
|
538 | (1) |
|
|
|
538 | (1) |
|
|
|
539 | (2) |
|
Chapter 21 Creating a Simple Calendar |
|
|
541 | (26) |
|
Building a Simple Display Calendar |
|
|
541 | (17) |
|
Creating the Calendar in JavaScript |
|
|
558 | (6) |
|
|
|
564 | (1) |
|
|
|
564 | (1) |
|
|
|
564 | (3) |
|
Chapter 22 Managing Web Applications |
|
|
567 | (16) |
|
Understanding Some Best Practices in Web Application Development |
|
|
567 | (3) |
|
Writing Maintainable Code |
|
|
570 | (5) |
|
Implementing Version Control in Your Work |
|
|
575 | (1) |
|
Understanding the Value and Use of Code Frameworks |
|
|
576 | (5) |
|
|
|
581 | (1) |
|
|
|
581 | (1) |
|
|
|
582 | (1) |
| Appendixes |
|
|
Appendix A Installation QuickStart Guide with XAMPP |
|
|
583 | (14) |
|
Using Third-Party Installation Packages |
|
|
583 | (1) |
|
Installing XAMPP on Linux/UNIX |
|
|
584 | (2) |
|
Installing XAMPP on Windows |
|
|
586 | (3) |
|
Installing XAMPP on Mac OS X |
|
|
589 | (5) |
|
|
|
594 | (1) |
|
|
|
595 | (2) |
|
Appendix B Installing and Configuring MySQL |
|
|
597 | (20) |
|
Current and Future Versions of MySQL |
|
|
597 | (1) |
|
|
|
598 | (1) |
|
Installing MySQL on Linux/UNIX |
|
|
598 | (3) |
|
Installing MySQL on Mac OS X |
|
|
601 | (2) |
|
Installing MySQL on Windows |
|
|
603 | (6) |
|
Troubleshooting Your Installation |
|
|
609 | (1) |
|
Basic Security Guidelines |
|
|
610 | (1) |
|
Introducing the MySQL Privilege System |
|
|
611 | (6) |
|
Appendix C Installing and Configuring Apache |
|
|
617 | (18) |
|
Current Versions of Apache |
|
|
617 | (1) |
|
Choosing the Appropriate Installation Method |
|
|
618 | (1) |
|
Installing Apache on Linux/UNIX |
|
|
619 | (2) |
|
Installing Apache on Mac OS X |
|
|
621 | (1) |
|
Installing Apache on Windows |
|
|
622 | (2) |
|
Apache Configuration File Structure |
|
|
624 | (5) |
|
|
|
629 | (1) |
|
|
|
630 | (1) |
|
Starting Apache for the First Time |
|
|
631 | (2) |
|
|
|
633 | (2) |
|
Appendix D Installing and Configuring PHP |
|
|
635 | (10) |
|
Current and Future Versions of PHP |
|
|
635 | (1) |
|
Building PHP on Linux/UNIX with Apache |
|
|
636 | (3) |
|
Installing PHP on Mac OS X |
|
|
639 | (1) |
|
Installing PHP on Windows |
|
|
640 | (2) |
|
|
|
642 | (1) |
|
Testing Your Installation |
|
|
642 | (1) |
|
Getting Installation Help |
|
|
643 | (2) |
| Index |
|
645 | |