Introduction |
|
1 | (10) |
I Using PHP |
|
|
|
11 | (42) |
|
Before You Begin: Accessing PHP |
|
|
12 | (1) |
|
Creating a Sample Application: Bob's Auto Parts |
|
|
12 | (2) |
|
|
12 | (2) |
|
|
14 | (1) |
|
|
14 | (4) |
|
|
16 | (1) |
|
|
16 | (1) |
|
|
17 | (1) |
|
|
17 | (1) |
|
|
18 | (2) |
|
|
19 | (1) |
|
Using the date() Function |
|
|
19 | (1) |
|
|
20 | (3) |
|
|
20 | (2) |
|
|
22 | (1) |
|
|
23 | (1) |
|
Understanding Identifiers |
|
|
23 | (1) |
|
|
24 | (2) |
|
|
24 | (1) |
|
|
25 | (1) |
|
|
25 | (1) |
|
|
25 | (1) |
|
Declaring and Using Constants |
|
|
26 | (1) |
|
Understanding Variable Scope |
|
|
27 | (1) |
|
|
28 | (8) |
|
|
28 | (1) |
|
|
29 | (1) |
|
|
29 | (2) |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
33 | (1) |
|
|
33 | (3) |
|
Working Out the Form Totals |
|
|
36 | (1) |
|
Understanding Precedence and Associativity |
|
|
37 | (2) |
|
Using Variable Handling Functions |
|
|
39 | (2) |
|
Testing and Setting Variable Types |
|
|
39 | (1) |
|
|
40 | (1) |
|
|
41 | (1) |
|
Making Decisions with Conditionals |
|
|
41 | (5) |
|
|
41 | (1) |
|
|
42 | (1) |
|
|
42 | (1) |
|
|
43 | (1) |
|
|
44 | (1) |
|
Comparing the Different Conditionals |
|
|
45 | (1) |
|
Repeating Actions Through Iteration |
|
|
46 | (4) |
|
|
47 | (2) |
|
|
49 | (1) |
|
|
50 | (1) |
|
Breaking Out of a Control Structure or Script |
|
|
50 | (1) |
|
Employing Alternative Control Structure Syntax |
|
|
51 | (1) |
|
|
51 | (1) |
|
|
52 | (1) |
|
2 Storing and Retrieving Data |
|
|
53 | (22) |
|
|
53 | (1) |
|
Storing and Retrieving Bob's Orders |
|
|
54 | (1) |
|
|
55 | (1) |
|
|
55 | (6) |
|
|
55 | (1) |
|
Using f open() to Open a File |
|
|
56 | (2) |
|
Opening Files Through FTP or HTTP |
|
|
58 | (1) |
|
Addressing Problems Opening Files |
|
|
58 | (3) |
|
|
61 | (2) |
|
|
62 | (1) |
|
|
62 | (1) |
|
|
63 | (2) |
|
|
65 | (4) |
|
Opening a File for Reading: fopen() |
|
|
66 | (1) |
|
Knowing When to Stop: feof() |
|
|
66 | (1) |
|
Reading a Line at a Time: fgets(), fgetss(), and fgetcsv() |
|
|
67 | (1) |
|
Reading the Whole File: readfile(), fpassthru(), file(), and file_get_contents() |
|
|
68 | (1) |
|
Reading a Character: fgetc() |
|
|
69 | (1) |
|
Reading an Arbitrary Length: fread() |
|
|
69 | (1) |
|
Using Other File Functions |
|
|
69 | (2) |
|
Checking Whether a File Is There: fileexists() |
|
|
70 | (1) |
|
Determining How Big a File Is: filesize() |
|
|
70 | (1) |
|
Deleting a File: unlink() |
|
|
70 | (1) |
|
Navigating Inside a File: rewind() , f seek() , and f tell() |
|
|
70 | (1) |
|
|
71 | (2) |
|
|
73 | (1) |
|
Problems with Using Flat Files |
|
|
73 | (1) |
|
How RDBMSs Solve These Problems |
|
|
74 | (1) |
|
|
74 | (1) |
|
|
74 | (1) |
|
|
75 | (26) |
|
|
75 | (1) |
|
Numerically Indexed Arrays |
|
|
76 | (3) |
|
Initializing Numerically Indexed Arrays |
|
|
76 | (1) |
|
|
77 | (1) |
|
Using Loops to Access the Array |
|
|
78 | (1) |
|
Arrays with Different Indices |
|
|
79 | (2) |
|
|
79 | (1) |
|
Accessing the Array Elements |
|
|
79 | (1) |
|
|
79 | (2) |
|
|
81 | (1) |
|
|
82 | (3) |
|
|
85 | (2) |
|
|
85 | (1) |
|
Using asort() and ksort() to Sort Arrays |
|
|
86 | (1) |
|
|
87 | (1) |
|
Sorting Multidimensional Arrays |
|
|
87 | (3) |
|
Using the array_multisort() function |
|
|
87 | (1) |
|
|
88 | (1) |
|
|
89 | (1) |
|
|
90 | (2) |
|
|
90 | (2) |
|
|
92 | (1) |
|
Loading Arrays from Files |
|
|
92 | (4) |
|
Performing Other Array Manipulations |
|
|
96 | (4) |
|
Navigating Within an Array: each(), current(), reset(), end(), next(), pos(), and prey() |
|
|
96 | (1) |
|
Applying Any Function to Each Element in an Array: array_walk() |
|
|
97 | (1) |
|
Counting Elements in an Array: count(), sizeof(), and array count values() |
|
|
98 | (1) |
|
Converting Arrays to Scalar Variables: extract() |
|
|
99 | (1) |
|
|
100 | (1) |
|
|
100 | (1) |
|
4 String Manipulation and Regular Expressions |
|
|
101 | (30) |
|
Creating a Sample Application: Smart Form Mail |
|
|
101 | (3) |
|
|
104 | (8) |
|
Trimming Strings: chop() , ltrim(), and trim() |
|
|
104 | (1) |
|
Formatting Strings for Output |
|
|
105 | (7) |
|
Joining and Splitting Strings with String Functions |
|
|
112 | (3) |
|
Using explod(), implode(), and join() |
|
|
112 | (1) |
|
|
113 | (1) |
|
|
114 | (1) |
|
|
115 | (1) |
|
Performing String Ordering: strcmp(), strcasecmp(), and strnatcmp() |
|
|
115 | (1) |
|
Testing String Length with strlen() |
|
|
115 | (1) |
|
Matching and Replacing Substrings with String Functions |
|
|
116 | (3) |
|
Finding Strings in Strings: strstr(), strchr(), strrchr(), and stristr() |
|
|
116 | (1) |
|
Finding the Position of a Substring: strpos() and st rrpos() |
|
|
117 | (1) |
|
Replacing Substrings: str_replace() and substrreplace() |
|
|
118 | (1) |
|
Introducing Regular Expressions |
|
|
119 | (9) |
|
|
120 | (1) |
|
|
120 | (1) |
|
Character Classes and Types |
|
|
120 | (2) |
|
|
122 | (1) |
|
|
122 | (1) |
|
|
123 | (1) |
|
Anchoring to the Beginning or End of a String |
|
|
123 | (1) |
|
|
123 | (1) |
|
Matching Literal Special Characters |
|
|
123 | (1) |
|
Reviewing Meta Characters |
|
|
124 | (1) |
|
|
125 | (1) |
|
|
126 | (1) |
|
|
126 | (1) |
|
Putting It All Together for the Smart Form |
|
|
127 | (1) |
|
Finding Substrings with Regular Expressions |
|
|
128 | (1) |
|
Replacing Substrings with Regular Expressions |
|
|
129 | (1) |
|
Splitting Strings with Regular Expressions |
|
|
129 | (1) |
|
|
130 | (1) |
|
|
130 | (1) |
|
5 Reusing Code and Writing Functions |
|
|
131 | (28) |
|
The Advantages of Reusing Code |
|
|
131 | (1) |
|
|
132 | (1) |
|
|
132 | (1) |
|
|
132 | (1) |
|
Using require() and include() |
|
|
132 | (8) |
|
Using require() to Include Code |
|
|
133 | (1) |
|
Using require() for Website Templates |
|
|
134 | (5) |
|
Using auto_prepend_file and auto_append_file |
|
|
139 | (1) |
|
|
140 | (4) |
|
|
141 | (1) |
|
Calling an Undefined Function |
|
|
142 | (1) |
|
Understanding Case and Function Names |
|
|
143 | (1) |
|
Defining Your Own Functions |
|
|
144 | (1) |
|
Examining Basic Function Structure |
|
|
144 | (2) |
|
|
145 | (1) |
|
|
146 | (2) |
|
|
148 | (2) |
|
Passing by Reference Versus Passing by Value |
|
|
150 | (2) |
|
|
152 | (2) |
|
Returning Values from Functions |
|
|
153 | (1) |
|
|
154 | (3) |
|
Implementing Anonymous Functions (or Closures) |
|
|
155 | (2) |
|
|
157 | (1) |
|
|
157 | (2) |
|
|
159 | (40) |
|
Understanding Object-Oriented Concepts |
|
|
160 | (2) |
|
|
160 | (1) |
|
|
161 | (1) |
|
|
161 | (1) |
|
Creating Classes, Attributes, and Operations in PHP |
|
|
162 | (1) |
|
|
162 | (1) |
|
|
163 | (1) |
|
|
163 | (1) |
|
|
163 | (1) |
|
|
164 | (1) |
|
|
165 | (1) |
|
Controlling Access with private and public |
|
|
166 | (1) |
|
Writing Accessor Functions |
|
|
166 | (2) |
|
Implementing Inheritance in PHP |
|
|
168 | (6) |
|
Controlling Visibility Through Inheritance with private and protected |
|
|
169 | (1) |
|
|
170 | (2) |
|
Preventing Inheritance and Overriding with final |
|
|
172 | (1) |
|
Understanding Multiple Inheritance |
|
|
172 | (1) |
|
|
173 | (1) |
|
|
174 | (2) |
|
|
176 | (1) |
|
Writing the Code for Your Class |
|
|
177 | (8) |
|
Understanding Advanced Object-Oriented Functionality in PHP |
|
|
185 | (13) |
|
Using Per-Class Constants |
|
|
185 | (1) |
|
Implementing Static Methods |
|
|
185 | (1) |
|
Checking Class Type and Type Hinting |
|
|
185 | (1) |
|
|
186 | (1) |
|
|
187 | (1) |
|
|
188 | (1) |
|
Overloading Methods with call() |
|
|
188 | (1) |
|
|
189 | (1) |
|
Implementing Iterators and Iteration |
|
|
190 | (2) |
|
|
192 | (2) |
|
Converting Your Classes to Strings |
|
|
194 | (1) |
|
|
194 | (1) |
|
|
195 | (2) |
|
|
197 | (1) |
|
Understanding the Global Namespace |
|
|
197 | (1) |
|
Importing and Aliasing Namespaces |
|
|
198 | (1) |
|
|
198 | (1) |
|
7 Error and Exception Handling |
|
|
199 | (10) |
|
Exception Handling Concepts |
|
|
199 | (2) |
|
|
201 | (1) |
|
|
202 | (2) |
|
Exceptions in Bob's Auto Parts |
|
|
204 | (4) |
|
Exceptions and PHP's Other Error Handling Mechanisms |
|
|
208 | (1) |
|
|
208 | (1) |
|
|
208 | (1) |
II Using MySQL |
|
|
8 Designing Your Web Database |
|
|
209 | (12) |
|
Relational Database Concepts |
|
|
210 | (3) |
|
|
210 | (1) |
|
|
211 | (1) |
|
|
211 | (1) |
|
|
211 | (1) |
|
|
211 | (1) |
|
|
212 | (1) |
|
|
213 | (1) |
|
Designing Your Web Database |
|
|
213 | (5) |
|
Think About the Real-World Objects You Are Modeling |
|
|
213 | (1) |
|
Avoid Storing Redundant Data |
|
|
214 | (2) |
|
|
216 | (1) |
|
|
217 | (1) |
|
Think About What You Want to Ask the Database |
|
|
217 | (1) |
|
Avoid Designs with Many Empty Attributes |
|
|
217 | (1) |
|
|
218 | (1) |
|
Web Database Architecture |
|
|
218 | (2) |
|
|
220 | (1) |
|
|
220 | (1) |
|
9 Creating Your Web Database |
|
|
221 | (26) |
|
|
222 | (1) |
|
|
223 | (1) |
|
Creating Databases and Users |
|
|
224 | (1) |
|
Setting Up Users and Privileges |
|
|
225 | (1) |
|
Introducing MySQL's Privilege System |
|
|
225 | (6) |
|
Principle of Least Privilege |
|
|
225 | (1) |
|
User Setup: The CREATE USER and GRANT Commands |
|
|
225 | (2) |
|
Types and Levels of Privileges |
|
|
227 | (3) |
|
|
230 | (1) |
|
Examples Using GRANT and REVOKE |
|
|
230 | (1) |
|
Setting Up a User for the Web |
|
|
231 | (1) |
|
|
232 | (1) |
|
|
232 | (7) |
|
Understanding What the Other Keywords Mean |
|
|
234 | (1) |
|
Understanding the Column Types |
|
|
235 | (2) |
|
Looking at the Database with SHOW and DESCRIBE |
|
|
237 | (1) |
|
|
238 | (1) |
|
Understanding MySQL Identifiers |
|
|
239 | (1) |
|
Choosing Column Data Types |
|
|
240 | (6) |
|
|
241 | (2) |
|
|
243 | (1) |
|
|
244 | (2) |
|
|
246 | (1) |
|
|
246 | (1) |
|
10 Working with Your MySQL Database |
|
|
247 | (24) |
|
|
247 | (1) |
|
Inserting Data into the Database |
|
|
248 | (2) |
|
Retrieving Data from the Database |
|
|
250 | (15) |
|
Retrieving Data with Specific Criteria |
|
|
251 | (2) |
|
Retrieving Data from Multiple Tables |
|
|
253 | (6) |
|
Retrieving Data in a Particular Order |
|
|
259 | (1) |
|
Grouping and Aggregating Data |
|
|
259 | (2) |
|
Choosing Which Rows to Return |
|
|
261 | (1) |
|
|
262 | (3) |
|
Updating Records in the Database |
|
|
265 | (1) |
|
Altering Tables After Creation |
|
|
265 | (3) |
|
Deleting Records from the Database |
|
|
268 | (1) |
|
|
268 | (1) |
|
Dropping a Whole Database |
|
|
268 | (1) |
|
|
269 | (1) |
|
|
269 | (2) |
|
11 Accessing Your MySQL Database from the Web with PHP |
|
|
271 | (20) |
|
How Web Database Architectures Work |
|
|
272 | (3) |
|
Querying a Database from the Web |
|
|
275 | (7) |
|
Checking and Filtering Input Data |
|
|
276 | (1) |
|
|
277 | (1) |
|
Choosing a Database to Use |
|
|
278 | (1) |
|
|
278 | (1) |
|
Using Prepared Statements |
|
|
279 | (1) |
|
Retrieving the Query Results |
|
|
280 | (1) |
|
Disconnecting from the Database |
|
|
281 | (1) |
|
Putting New Information in the Database |
|
|
282 | (4) |
|
Using Other PHP-Database Interfaces |
|
|
286 | (3) |
|
Using a Generic Database Interface: PDO |
|
|
286 | (3) |
|
|
289 | (1) |
|
|
289 | (2) |
|
12 Advanced MySQL Administration |
|
|
291 | (24) |
|
Understanding the Privilege System in Detail |
|
|
291 | (8) |
|
|
293 | (2) |
|
|
295 | (1) |
|
The tables_priv, columns priv, and procs priv Tables |
|
|
296 | (2) |
|
Access Control: How MySQL Uses the Grant Tables |
|
|
298 | (1) |
|
Updating Privileges: When Do Changes Take Effect? |
|
|
299 | (1) |
|
Making Your MySQL Database Secure |
|
|
299 | (2) |
|
MySQL from the Operating System's Point of View |
|
|
299 | (1) |
|
|
300 | (1) |
|
|
300 | (1) |
|
|
301 | (1) |
|
Getting More Information About Databases |
|
|
301 | (8) |
|
Getting Information with SHOW |
|
|
302 | (2) |
|
Getting Information About Columns with DESCRIBE |
|
|
304 | (1) |
|
Understanding How Queries Work with EXPLAIN |
|
|
304 | (5) |
|
|
309 | (1) |
|
|
309 | (1) |
|
|
309 | (1) |
|
|
310 | (1) |
|
|
310 | (1) |
|
|
310 | (1) |
|
|
310 | (1) |
|
Backing Up Your MySQL Database |
|
|
310 | (1) |
|
Restoring Your MySQL Database |
|
|
311 | (1) |
|
|
311 | (3) |
|
|
312 | (1) |
|
Performing the Initial Data Transfer |
|
|
313 | (1) |
|
Setting Up the Slave or Slaves |
|
|
313 | (1) |
|
|
314 | (1) |
|
|
314 | (1) |
|
13 Advanced MySQL Programming |
|
|
315 | (16) |
|
The LOAD DATA INFILE Statement |
|
|
315 | (1) |
|
|
316 | (1) |
|
|
317 | (2) |
|
Understanding Transaction Definitions |
|
|
317 | (1) |
|
Using Transactions with InnoDB |
|
|
318 | (1) |
|
|
319 | (1) |
|
|
320 | (7) |
|
|
320 | (3) |
|
|
323 | (1) |
|
Cursors and Control Structures |
|
|
323 | (4) |
|
|
327 | (2) |
|
|
329 | (1) |
|
|
329 | (2) |
III Web Application Security |
|
|
14 Web Application Security Risks |
|
|
331 | (10) |
|
Identifying the Threats We Face |
|
|
331 | (8) |
|
|
331 | (3) |
|
|
334 | (1) |
|
Loss or Destruction of Data |
|
|
334 | (1) |
|
|
335 | (2) |
|
|
337 | (1) |
|
|
338 | (1) |
|
|
338 | (1) |
|
Understanding Who We're Dealing With |
|
|
339 | (1) |
|
|
339 | (1) |
|
Unwitting Users of Infected Machines |
|
|
339 | (1) |
|
|
339 | (1) |
|
|
340 | (1) |
|
|
340 | (1) |
|
|
340 | (1) |
|
15 Building a Secure Web Application |
|
|
341 | (24) |
|
Strategies for Dealing with Security |
|
|
341 | (2) |
|
Start with the Right Mindset |
|
|
342 | (1) |
|
Balancing Security and Usability |
|
|
342 | (1) |
|
|
342 | (1) |
|
|
343 | (1) |
|
|
343 | (11) |
|
|
343 | (5) |
|
|
348 | (2) |
|
|
350 | (1) |
|
|
351 | (1) |
|
File System Considerations |
|
|
352 | (1) |
|
|
352 | (1) |
|
|
353 | (1) |
|
Securing Your Web Server and PHP |
|
|
354 | (3) |
|
|
354 | (1) |
|
|
355 | (1) |
|
|
356 | (1) |
|
Shared Hosting of Web Applications |
|
|
356 | (1) |
|
|
357 | (3) |
|
Users and the Permissions System |
|
|
358 | (1) |
|
Sending Data to the Server |
|
|
358 | (1) |
|
|
359 | (1) |
|
|
359 | (1) |
|
|
360 | (1) |
|
|
360 | (1) |
|
|
360 | (1) |
|
Prepare for DoS and DDoS Attacks |
|
|
361 | (1) |
|
Computer and Operating System Security |
|
|
361 | (1) |
|
Keep the Operating System Up to Date |
|
|
361 | (1) |
|
Run Only What Is Necessary |
|
|
362 | (1) |
|
Physically Secure the Server |
|
|
362 | (1) |
|
|
362 | (2) |
|
|
364 | (1) |
|
16 Implementing Authentication Methods with PHP |
|
|
365 | (14) |
|
|
365 | (1) |
|
Implementing Access Control |
|
|
366 | (6) |
|
|
369 | (1) |
|
|
369 | (2) |
|
Protecting Multiple Pages |
|
|
371 | (1) |
|
Using Basic Authentication |
|
|
372 | (1) |
|
Using Basic Authentication in PHP |
|
|
372 | (2) |
|
Using Basic Authentication with Apache's .htaccess Files |
|
|
374 | (3) |
|
Creating Your Own Custom Authentication |
|
|
377 | (1) |
|
|
377 | (1) |
|
|
377 | (2) |
IV Advanced PHP Techniques |
|
|
17 Interacting with the File System and the Server |
|
|
379 | (24) |
|
|
379 | (11) |
|
|
381 | (1) |
|
Writing the PHP to Deal with the File |
|
|
382 | (5) |
|
|
387 | (2) |
|
Avoiding Common Upload Problems |
|
|
389 | (1) |
|
Using Directory Functions |
|
|
390 | (5) |
|
|
390 | (4) |
|
Getting Information About the Current Directory |
|
|
394 | (1) |
|
Creating and Deleting Directories |
|
|
394 | (1) |
|
Interacting with the File System |
|
|
395 | (3) |
|
|
395 | (2) |
|
|
397 | (1) |
|
Creating, Deleting, and Moving Files |
|
|
398 | (1) |
|
Using Program Execution Functions |
|
|
398 | (3) |
|
Interacting with the Environment: getenv() and putenv() |
|
|
401 | (1) |
|
|
402 | (1) |
|
|
402 | (1) |
|
18 Using Network and Protocol Functions |
|
|
403 | (20) |
|
Examining Available Protocols |
|
|
403 | (1) |
|
Sending and Reading Email |
|
|
404 | (1) |
|
Using Data from Other Websites |
|
|
404 | (4) |
|
Using Network Lookup Functions |
|
|
408 | (4) |
|
Backing Up or Mirroring a File |
|
|
412 | (9) |
|
Using FTP to Back Up or Mirror a File |
|
|
412 | (8) |
|
|
420 | (1) |
|
|
420 | (1) |
|
Using Other FTP Functions |
|
|
420 | (1) |
|
|
421 | (1) |
|
|
421 | (2) |
|
19 Managing the Date and Time |
|
|
423 | (14) |
|
Getting the Date and Time from PHP |
|
|
423 | (8) |
|
|
423 | (1) |
|
Using the date() Function |
|
|
424 | (2) |
|
Dealing with Unix Timestamps |
|
|
426 | (1) |
|
Using the getdate() Function |
|
|
427 | (1) |
|
Validating Dates with checkdate() |
|
|
428 | (1) |
|
|
429 | (2) |
|
Converting Between PHP and MySQL Date Formats |
|
|
431 | (2) |
|
|
433 | (1) |
|
Calculating Dates in MySQL |
|
|
434 | (1) |
|
|
435 | (1) |
|
Using the Calendar Functions |
|
|
436 | (1) |
|
|
436 | (1) |
|
|
436 | (1) |
|
20 Internationalization and Localization |
|
|
437 | (12) |
|
Localization Is More than Translation |
|
|
437 | (1) |
|
Understanding Character Sets |
|
|
438 | (2) |
|
Security Implications of Character Sets |
|
|
439 | (1) |
|
Using Multibyte String Functions in PHP |
|
|
440 | (1) |
|
Creating a Basic Localizable Page Structure |
|
|
440 | (4) |
|
Using gettext() in an Internationalized Application |
|
|
444 | (4) |
|
Configuring Your System to Use gettext() |
|
|
444 | (1) |
|
Creating Translation Files |
|
|
445 | (2) |
|
Implementing Localized Content in PHP Using gettext() |
|
|
447 | (1) |
|
|
448 | (1) |
|
|
448 | (1) |
|
|
449 | (26) |
|
Setting Up Image Support in PHP |
|
|
449 | (1) |
|
Understanding Image Formats |
|
|
450 | (1) |
|
|
450 | (1) |
|
|
450 | (1) |
|
|
451 | (1) |
|
|
451 | (5) |
|
|
452 | (1) |
|
Drawing or Printing Text on the Image |
|
|
453 | (2) |
|
Outputting the Final Graphic |
|
|
455 | (1) |
|
|
455 | (1) |
|
Using Automatically Generated Images in Other Pages |
|
|
456 | (1) |
|
Using Text and Fonts to Create Images |
|
|
457 | (8) |
|
Setting Up the Base Canvas |
|
|
460 | (1) |
|
Fitting the Text onto the Button |
|
|
461 | (3) |
|
|
464 | (1) |
|
Writing the Text onto the Button |
|
|
464 | (1) |
|
|
465 | (1) |
|
Drawing Figures and Graphing Data |
|
|
465 | (9) |
|
Using Other Image Functions |
|
|
474 | (1) |
|
|
474 | (1) |
|
22 Using Session Control in PHP |
|
|
475 | (18) |
|
|
475 | (1) |
|
Understanding Basic Session Functionality |
|
|
476 | (2) |
|
|
476 | (1) |
|
|
476 | (1) |
|
Using Cookies with Sessions |
|
|
477 | (1) |
|
|
477 | (1) |
|
Implementing Simple Sessions |
|
|
478 | (2) |
|
|
478 | (1) |
|
Registering Session Variables |
|
|
478 | (1) |
|
|
479 | (1) |
|
Unsetting Variables and Destroying the Session |
|
|
479 | (1) |
|
Creating a Simple Session Example |
|
|
480 | (2) |
|
Configuring Session Control |
|
|
482 | (1) |
|
Implementing Authentication with Session Control |
|
|
483 | (8) |
|
|
491 | (2) |
|
23 Integrating JavaScript and PHP |
|
|
493 | (26) |
|
|
493 | (1) |
|
A Brief Introduction to jQuery |
|
|
494 | (1) |
|
Using jQuery in Web Applications |
|
|
494 | (10) |
|
Using jQuery and AJAX with PHP |
|
|
504 | (13) |
|
The AJAX-Enabled Chat Script/Server |
|
|
504 | (3) |
|
|
507 | (3) |
|
The Chat Client/jQuery Application |
|
|
510 | (7) |
|
|
517 | (1) |
|
|
517 | (2) |
|
|
519 | (10) |
|
Evaluating Strings: eval() |
|
|
519 | (1) |
|
Terminating Execution: die() and exit() |
|
|
520 | (1) |
|
Serializing Variables and Objects |
|
|
521 | (1) |
|
Getting Information About the PHP Environment |
|
|
522 | (2) |
|
Finding Out What Extensions Are Loaded |
|
|
522 | (1) |
|
Identifying the Script Owner |
|
|
523 | (1) |
|
Finding Out When the Script Was Modified |
|
|
523 | (1) |
|
Temporarily Altering the Runtime Environment |
|
|
524 | (1) |
|
|
525 | (1) |
|
Using PHP on the Command Line |
|
|
526 | (1) |
|
|
527 | (2) |
V Building Practical PHP and MySQL Projects |
|
|
25 Using PHP and MySQL for Large Projects |
|
|
529 | (14) |
|
Applying Software Engineering to Web Development |
|
|
530 | (1) |
|
Planning and Running a Web Application Project |
|
|
530 | (1) |
|
|
531 | (1) |
|
Writing Maintainable Code |
|
|
532 | (4) |
|
|
532 | (3) |
|
|
535 | (1) |
|
Using a Standard Directory Structure |
|
|
536 | (1) |
|
Documenting and Sharing In-House Functions |
|
|
536 | (1) |
|
Implementing Version Control |
|
|
536 | (1) |
|
Choosing a Development Environment |
|
|
537 | (1) |
|
Documenting Your Projects |
|
|
538 | (1) |
|
|
538 | (1) |
|
Separating Logic and Content |
|
|
539 | (1) |
|
|
540 | (1) |
|
Using Simple Optimizations |
|
|
540 | (1) |
|
|
541 | (1) |
|
|
542 | (1) |
|
|
542 | (1) |
|
|
543 | (18) |
|
|
543 | (8) |
|
|
543 | (1) |
|
|
544 | (5) |
|
|
549 | (2) |
|
|
551 | (2) |
|
|
553 | (1) |
|
Altering the Error Reporting Settings |
|
|
554 | (2) |
|
Triggering Your Own Errors |
|
|
556 | (1) |
|
Logging Errors Gracefully |
|
|
557 | (3) |
|
Logging Errors to a Log File |
|
|
560 | (1) |
|
|
560 | (1) |
|
27 Building User Authentication and Personalization |
|
|
561 | (38) |
|
|
561 | (2) |
|
User Identification and Personalization |
|
|
562 | (1) |
|
|
563 | (1) |
|
|
563 | (1) |
|
|
563 | (2) |
|
Implementing the Database |
|
|
565 | (1) |
|
Implementing the Basic Site |
|
|
566 | (3) |
|
Implementing User Authentication |
|
|
569 | (18) |
|
|
569 | (6) |
|
|
575 | (4) |
|
|
579 | (1) |
|
|
580 | (2) |
|
Resetting Forgotten Passwords |
|
|
582 | (5) |
|
Implementing Bookmark Storage and Retrieval |
|
|
587 | (7) |
|
|
588 | (2) |
|
|
590 | (1) |
|
|
591 | (3) |
|
Implementing Recommendations |
|
|
594 | (4) |
|
Considering Possible Extensions |
|
|
598 | (1) |
|
28 Building a Web-Based Email Service with Laravel Part I Web Edition |
|
|
|
29 Building a Web-Based Email Service with Laravel Part II Web Edition |
|
|
|
30 Social Media Integration Sharing and Authentication Web Edition |
|
|
|
31 Building a Shopping Cart Web Edition |
|
|
VI Appendix |
|
|
A Installing Apache, PHP, and MySQL |
|
|
599 | (16) |
|
Installing Apache, PHP, and MySQL Under UNIX |
|
|
600 | (12) |
|
|
600 | (1) |
|
|
601 | (7) |
|
Basic Apache Configuration Modifications |
|
|
608 | (2) |
|
|
610 | (1) |
|
|
610 | (2) |
|
Installing Apache, PHP, and MySQL for Windows and Mac OS X Using All-in-One Installation Packages |
|
|
612 | (1) |
|
|
613 | (1) |
|
Installing PHP with Other Web Servers |
|
|
614 | (1) |
Index |
|
615 | |