Introduction |
|
1 | (12) |
|
|
|
|
13 | (46) |
|
Before You Begin: Accessing PHP |
|
|
14 | (1) |
|
Creating a Sample Application: Bob's Auto Parts |
|
|
14 | (3) |
|
|
14 | (2) |
|
|
16 | (1) |
|
|
17 | (4) |
|
|
18 | (1) |
|
|
19 | (1) |
|
|
20 | (1) |
|
|
20 | (1) |
|
|
21 | (2) |
|
|
22 | (1) |
|
Using the date () Function |
|
|
22 | (1) |
|
|
23 | (5) |
|
Short, Medium, and Long Variables |
|
|
23 | (3) |
|
|
26 | (1) |
|
|
27 | (1) |
|
Understanding Identifiers |
|
|
28 | (1) |
|
|
29 | (2) |
|
|
29 | (1) |
|
|
29 | (1) |
|
|
30 | (1) |
|
|
30 | (1) |
|
Declaring and Using Constants |
|
|
31 | (1) |
|
Understanding Variable Scope |
|
|
31 | (1) |
|
|
32 | (9) |
|
|
33 | (1) |
|
|
34 | (1) |
|
|
34 | (2) |
|
|
36 | (2) |
|
|
38 | (1) |
|
|
38 | (1) |
|
|
39 | (2) |
|
Working Out the Form Totals |
|
|
41 | (1) |
|
Understanding Precedence and Associativity |
|
|
42 | (2) |
|
|
44 | (2) |
|
Testing and Setting Variable Types |
|
|
44 | (1) |
|
|
45 | (1) |
|
|
46 | (1) |
|
Making Decisions with Conditionals |
|
|
46 | (5) |
|
|
46 | (1) |
|
|
47 | (1) |
|
|
47 | (1) |
|
|
48 | (1) |
|
|
49 | (2) |
|
Comparing the Different Conditionals |
|
|
51 | (1) |
|
Repeating Actions Through Iteration |
|
|
51 | (5) |
|
|
53 | (1) |
|
|
54 | (1) |
|
|
55 | (1) |
|
Breaking Out of a Control Structure or Script |
|
|
56 | (1) |
|
Employing Alternative Control Structure Syntasx |
|
|
56 | (1) |
|
|
57 | (1) |
|
|
57 | (2) |
|
Storing and Retrieving Data |
|
|
59 | (22) |
|
|
59 | (1) |
|
Storing and Retrieving Bob's Orders |
|
|
60 | (1) |
|
|
61 | (1) |
|
|
61 | (6) |
|
|
61 | (1) |
|
Using fopen () to Open a File |
|
|
62 | (2) |
|
Opening Files Through FTP or HTTP |
|
|
64 | (1) |
|
Addressing Problems Opening Files |
|
|
65 | (2) |
|
|
67 | (2) |
|
|
68 | (1) |
|
|
68 | (1) |
|
|
69 | (2) |
|
|
71 | (5) |
|
Opening a File for Reading: fopen() |
|
|
72 | (1) |
|
Knowing When to Stop: feof() |
|
|
73 | (1) |
|
Reading a Line at a Time: fgets(), fgetss(), and fgetcsv() |
|
|
73 | (1) |
|
Reading the Whole File: readfile(), fpassthru(), and file() |
|
|
74 | (1) |
|
Reading a Character: fgetc() |
|
|
75 | (1) |
|
Reading an Arbitrary Length: fread() |
|
|
75 | (1) |
|
Using Other Useful File Functions |
|
|
76 | (2) |
|
Checking Whether a File Is There: file_exists() |
|
|
76 | (1) |
|
Determining How Big a File Is: filesize() |
|
|
76 | (1) |
|
Deleting a File: unlink() |
|
|
76 | (1) |
|
Navigating Inside a File: rewind(), fseek(), and ftell() |
|
|
76 | (2) |
|
|
78 | (1) |
|
A Better Way: Database Management Systems |
|
|
79 | (1) |
|
Problems with Using Flat Files |
|
|
79 | (1) |
|
How RDBMSs Solve These Problems |
|
|
80 | (1) |
|
|
80 | (1) |
|
|
80 | (1) |
|
|
81 | (26) |
|
|
81 | (1) |
|
Numerically Indexed Arrays |
|
|
82 | (3) |
|
Initializing Numerically Indexed Arrays |
|
|
82 | (1) |
|
|
83 | (1) |
|
Using Loops to Access the Array |
|
|
84 | (1) |
|
Arrays with Different Indices |
|
|
85 | (2) |
|
|
85 | (1) |
|
Accessing the Array Elements |
|
|
85 | (1) |
|
|
85 | (2) |
|
|
87 | (1) |
|
|
88 | (4) |
|
|
92 | (1) |
|
|
92 | (1) |
|
Using asort() and ksort() to Sort Arrays |
|
|
93 | (1) |
|
|
93 | (1) |
|
Sorting Multidimensional Arrays |
|
|
93 | (3) |
|
|
93 | (2) |
|
|
95 | (1) |
|
|
96 | (2) |
|
|
96 | (1) |
|
|
97 | (1) |
|
Loading Arrays from Files |
|
|
98 | (4) |
|
Performing Other Arrays Manipulations |
|
|
102 | (4) |
|
Navigating Within an Array: each(), current(), reset(), end(), next(), pos(), and prev() |
|
|
102 | (1) |
|
Applying Any Function to Each Element in an Array: array_walk() |
|
|
103 | (1) |
|
Counting Elements in an Array: count(), sizeof(), and array_count_values() |
|
|
104 | (1) |
|
Converting Arrays to Scalar Variables: extract() |
|
|
105 | (1) |
|
|
106 | (1) |
|
|
106 | (1) |
|
String Manipulation and Regular Expressions |
|
|
107 | (26) |
|
Creating a Sample Application: Smart Form Mail |
|
|
107 | (3) |
|
|
110 | (6) |
|
Trimming Strings: chop(), Itrim(), and trim() |
|
|
110 | (1) |
|
Formatting Strings for Presentation |
|
|
110 | (4) |
|
Formatting Strings for Storage: addslashes() and stripslashes() |
|
|
114 | (2) |
|
Joining and Splitting Strings with String Functions |
|
|
116 | (3) |
|
Using explode(), implode(), and join() |
|
|
116 | (1) |
|
|
117 | (1) |
|
|
118 | (1) |
|
|
119 | (1) |
|
Performing String Ordering: strcmp(), strcasecmp(), and strnatcmp() |
|
|
119 | (1) |
|
Testing String Length with strlen() |
|
|
120 | (1) |
|
Matching and Replacing Substrings with string Functions |
|
|
120 | (3) |
|
Finding Strings in Strings: strstr(), strchr(), strrchr(), and stristr() |
|
|
120 | (1) |
|
Finding the Position of a Substring: strpos() and strrpos() |
|
|
121 | (1) |
|
Replacing Substrings: str_replace() and substr_replace() |
|
|
122 | (1) |
|
Introducing Regular Expressions |
|
|
123 | (6) |
|
|
124 | (1) |
|
Character Sets and Classes |
|
|
124 | (2) |
|
|
126 | (1) |
|
|
126 | (1) |
|
|
126 | (1) |
|
Anchoring to the Beginning or End of a String |
|
|
126 | (1) |
|
|
127 | (1) |
|
Matching Literal Special Characters |
|
|
127 | (1) |
|
Reviewing the Special Characters |
|
|
127 | (1) |
|
Putting It All Together for the Smart Form |
|
|
128 | (1) |
|
Finding Substrings with Regular Expressions |
|
|
129 | (1) |
|
Replacing Substrings with Regular Expressions |
|
|
130 | (1) |
|
Splitting Strings with Regular Expressions |
|
|
130 | (1) |
|
|
131 | (1) |
|
|
131 | (2) |
|
Reusing Code and Writing Functions |
|
|
133 | (26) |
|
The Advantages of Reusing Code |
|
|
133 | (1) |
|
|
134 | (1) |
|
|
134 | (1) |
|
|
134 | (1) |
|
Using require() and include() |
|
|
134 | (9) |
|
Filename Extensions and require() |
|
|
135 | (2) |
|
Using require() for Website Templates |
|
|
137 | (5) |
|
Using auto_prepend_file and auto_append_file |
|
|
142 | (1) |
|
|
143 | (3) |
|
|
143 | (2) |
|
Calling an Undefined Function |
|
|
145 | (1) |
|
Understanding Case and Function Names |
|
|
146 | (1) |
|
Defining Your Own Functions |
|
|
146 | (1) |
|
Examining Basic Function Structure |
|
|
146 | (2) |
|
|
147 | (1) |
|
|
148 | (2) |
|
|
150 | (3) |
|
Passing by Reference Versus Passing by Value |
|
|
153 | (1) |
|
|
154 | (2) |
|
Returning Values from Functions |
|
|
155 | (1) |
|
|
156 | (2) |
|
|
158 | (1) |
|
|
158 | (1) |
|
|
158 | (1) |
|
|
159 | (34) |
|
Understanding Object-Oriented Concepts |
|
|
160 | (2) |
|
|
160 | (1) |
|
|
161 | (1) |
|
|
162 | (1) |
|
Creating Classes, Attributes, and Operations in PHP |
|
|
162 | (2) |
|
|
162 | (1) |
|
|
163 | (1) |
|
|
163 | (1) |
|
|
164 | (1) |
|
|
164 | (2) |
|
Controlling Access with private and public |
|
|
166 | (1) |
|
|
167 | (1) |
|
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 |
|
|
173 | (1) |
|
|
173 | (1) |
|
|
174 | (1) |
|
Writing the Code for Your Class |
|
|
175 | (8) |
|
Understanding Advanced Object-Oriented Functionality in PHP |
|
|
183 | (8) |
|
Using Per-Class Constants |
|
|
184 | (1) |
|
Implementing Static Methods |
|
|
184 | (1) |
|
Checking Class Types and Type Hinting |
|
|
184 | (1) |
|
|
185 | (1) |
|
|
186 | (1) |
|
|
186 | (1) |
|
Overloading Methods with ___call() |
|
|
186 | (1) |
|
|
187 | (1) |
|
Implementing Iterators and Iteration |
|
|
188 | (2) |
|
Converting Your Classes to Strings |
|
|
190 | (1) |
|
|
190 | (1) |
|
|
191 | (2) |
|
Error and Exception Handling |
|
|
193 | (14) |
|
Exception Handling Concepts |
|
|
193 | (2) |
|
|
195 | (1) |
|
|
196 | (3) |
|
Exceptions in Bob's Auto Parts |
|
|
199 | (3) |
|
Exceptions and PHP's Other Error Handling Mechanisms |
|
|
202 | (1) |
|
|
203 | (1) |
|
|
203 | (4) |
|
|
|
Designing Your Web Database |
|
|
207 | (12) |
|
Relational Database Concepts |
|
|
208 | (3) |
|
|
208 | (1) |
|
|
209 | (1) |
|
|
209 | (1) |
|
|
209 | (1) |
|
|
209 | (1) |
|
|
210 | (1) |
|
|
211 | (1) |
|
Designing Your Web Database |
|
|
211 | (5) |
|
Think About the Real-World Objects You Are Modeling |
|
|
211 | (1) |
|
Avoid Storing Redundant Data |
|
|
212 | (2) |
|
|
214 | (1) |
|
|
215 | (1) |
|
Think About What You Want to Ask the Database |
|
|
215 | (1) |
|
Avoid Designs with Many Empty Attributes |
|
|
215 | (1) |
|
|
216 | (1) |
|
Web Database Architecture |
|
|
216 | (2) |
|
|
218 | (1) |
|
|
218 | (1) |
|
Creating Your Web Database |
|
|
219 | (24) |
|
|
220 | (1) |
|
|
221 | (1) |
|
Creating Databases and Users |
|
|
222 | (1) |
|
Setting Up Users and Privileges |
|
|
223 | (1) |
|
Introducing MySQL's Privilege System |
|
|
223 | (5) |
|
Principle of Least Privilege |
|
|
223 | (1) |
|
User Setup: The GRANT Command |
|
|
223 | (2) |
|
Types and Levels of Privileges |
|
|
225 | (2) |
|
|
227 | (1) |
|
Examples Using GRANT and REVOKE |
|
|
227 | (1) |
|
Setting Up a User for the Web |
|
|
228 | (1) |
|
|
229 | (1) |
|
|
229 | (6) |
|
Understanding What the Other Keywords Mean |
|
|
231 | (1) |
|
Understanding the Column Types |
|
|
232 | (1) |
|
Looking at the Database with SHOW and DESCRIBE |
|
|
233 | (1) |
|
|
234 | (1) |
|
Understanding MySQL Identifiers |
|
|
235 | (1) |
|
Choosing Column Data Types |
|
|
236 | (5) |
|
|
236 | (2) |
|
|
238 | (1) |
|
|
239 | (2) |
|
|
241 | (1) |
|
|
241 | (2) |
|
Working with Your MySQL Database |
|
|
243 | (24) |
|
|
243 | (1) |
|
Inserting Data into the Database |
|
|
244 | (2) |
|
Retrieving Data from the Database |
|
|
246 | (15) |
|
Retrieving Data with Specific Criteria |
|
|
248 | (1) |
|
Retrieving Data from Multiple Tables |
|
|
249 | (6) |
|
Retrieving Data in a Particular Order |
|
|
255 | (1) |
|
Grouping and Aggregating Data |
|
|
256 | (2) |
|
choosing Which Rows to Return |
|
|
258 | (1) |
|
|
258 | (3) |
|
Updating Records in the Database |
|
|
261 | (1) |
|
Altering Tables After Creation |
|
|
261 | (3) |
|
Deleting Records from the Database |
|
|
264 | (1) |
|
|
264 | (1) |
|
Dropping a Whole Database |
|
|
264 | (1) |
|
|
265 | (1) |
|
|
265 | (2) |
|
Accessing Your MySQL Database from the Web with PHP |
|
|
267 | (20) |
|
How Web Database Architectures Work |
|
|
268 | (3) |
|
Querying a Database from the Web |
|
|
271 | (5) |
|
Checking and Filtering Input Data |
|
|
271 | (1) |
|
|
272 | (2) |
|
Choosing a Database to Use |
|
|
274 | (1) |
|
|
274 | (1) |
|
Retrieving the Query Results |
|
|
275 | (1) |
|
Disconnecting from the Database |
|
|
276 | (1) |
|
Putting New Information in the Database |
|
|
276 | (4) |
|
Using Prepared Statements |
|
|
280 | (2) |
|
Using Other PHP-Database Interfaces |
|
|
282 | (3) |
|
Using a Generic Database Interface: Pear MDB2 |
|
|
282 | (3) |
|
|
285 | (1) |
|
|
285 | (2) |
|
Advanced MySQL Administration |
|
|
287 | (24) |
|
Understanding the Privilege System in Detail |
|
|
287 | (7) |
|
|
289 | (1) |
|
|
290 | (2) |
|
The table_priv, columns_priv, and procs priv Tables |
|
|
292 | (1) |
|
Access Control: How MySQL Uses the Grant Tables |
|
|
293 | (1) |
|
Updating Privileges: When Do Changes Take Effect? |
|
|
293 | (1) |
|
Making Your MySQL Database Secure |
|
|
294 | (2) |
|
MySQL from the Operating System's Point of View |
|
|
294 | (1) |
|
|
295 | (1) |
|
|
295 | (1) |
|
|
296 | (1) |
|
Getting More Information About Databases |
|
|
296 | (8) |
|
Getting Information with SHOW |
|
|
296 | (3) |
|
Getting Information About Columns with DESCRIBE |
|
|
299 | (1) |
|
Understanding How Queries Work with EXPLAIN |
|
|
299 | (5) |
|
|
304 | (1) |
|
|
304 | (1) |
|
|
304 | (1) |
|
|
304 | (1) |
|
|
305 | (1) |
|
|
305 | (1) |
|
|
305 | (1) |
|
Backing Up Your MySQL Database |
|
|
305 | (1) |
|
Restoring Your MySQL Database |
|
|
306 | (1) |
|
|
306 | (3) |
|
|
307 | (1) |
|
Performing the Initial Data Transfer |
|
|
307 | (1) |
|
Setting Up the Slave or Slaves |
|
|
308 | (1) |
|
|
309 | (1) |
|
|
309 | (2) |
|
Advanced MySQL Programming |
|
|
311 | (16) |
|
The LOAD DATA INFILE Statement |
|
|
311 | (1) |
|
|
312 | (1) |
|
|
313 | (2) |
|
Understanding Transaction Definitions |
|
|
313 | (1) |
|
Using Transactions with InnoDB |
|
|
314 | (1) |
|
|
315 | (1) |
|
|
316 | (7) |
|
|
316 | (3) |
|
|
319 | (1) |
|
Cursors and Control Structures |
|
|
319 | (4) |
|
|
323 | (1) |
|
|
323 | (4) |
|
III E-commerce and Security |
|
|
|
Running an E-commerce Site |
|
|
327 | (14) |
|
Deciding What You Want to Achieve |
|
|
327 | (1) |
|
Considering the Types of Commercial Websites |
|
|
327 | (9) |
|
Publishing Information using Online Brochures |
|
|
328 | (3) |
|
Taking Orders for Goods or Services |
|
|
331 | (3) |
|
Providing Services and Digital Goods |
|
|
334 | (1) |
|
Adding Value to Goods or Services |
|
|
335 | (1) |
|
|
335 | (1) |
|
Understanding Risks and Threats |
|
|
336 | (3) |
|
|
337 | (1) |
|
Failure to Attract Sufficient Business |
|
|
337 | (1) |
|
Computer Hardware Failure |
|
|
337 | (1) |
|
Power, Communication, Network, or Shipping Failures |
|
|
338 | (1) |
|
|
338 | (1) |
|
|
338 | (1) |
|
Evolving Governmental Policies and Taxes |
|
|
339 | (1) |
|
|
339 | (1) |
|
|
339 | (1) |
|
|
339 | (2) |
|
E-commerce Security Issues |
|
|
341 | (20) |
|
How Important Is Your Information? |
|
|
342 | (1) |
|
|
342 | (7) |
|
Exposure of Confidential Data |
|
|
343 | (1) |
|
Loss or Destruction of Data |
|
|
344 | (1) |
|
|
345 | (1) |
|
|
346 | (1) |
|
|
347 | (1) |
|
|
348 | (1) |
|
Usability, Performance, Cost, and Security |
|
|
349 | (1) |
|
Creating a Security Policy |
|
|
349 | (1) |
|
Authentication Principles |
|
|
350 | (1) |
|
|
351 | (4) |
|
|
353 | (1) |
|
|
353 | (1) |
|
|
354 | (1) |
|
|
355 | (1) |
|
|
356 | (1) |
|
|
357 | (1) |
|
|
357 | (1) |
|
|
358 | (1) |
|
|
358 | (1) |
|
Backing Up and Restoring Your MySQL Database |
|
|
358 | (1) |
|
|
359 | (1) |
|
|
359 | (2) |
|
|
361 | (30) |
|
Strategies for Dealing with Security |
|
|
361 | (2) |
|
Start with the Right Mindset |
|
|
362 | (1) |
|
Balancing Security and Usability |
|
|
362 | (1) |
|
|
363 | (1) |
|
|
363 | (1) |
|
Identifying the Threats We Face |
|
|
363 | (2) |
|
Access to or Modification of Sensitive Data |
|
|
363 | (1) |
|
Loss or Destruction of Data |
|
|
364 | (1) |
|
|
364 | (1) |
|
|
365 | (1) |
|
|
365 | (1) |
|
Understanding Who We're Dealing With |
|
|
365 | (2) |
|
|
366 | (1) |
|
Unwitting Users of Infected Machines |
|
|
366 | (1) |
|
|
366 | (1) |
|
|
366 | (1) |
|
|
366 | (1) |
|
|
367 | (11) |
|
|
367 | (4) |
|
|
371 | (3) |
|
|
374 | (1) |
|
|
374 | (1) |
|
File System Considerations |
|
|
375 | (1) |
|
|
376 | (1) |
|
Execution Quotes and exec |
|
|
377 | (1) |
|
Securing Your Web Server and PHP |
|
|
378 | (5) |
|
|
378 | (2) |
|
|
380 | (1) |
|
|
380 | (2) |
|
Commercially Hosted Web Applications |
|
|
382 | (1) |
|
|
383 | (2) |
|
Users and the Permissions System |
|
|
383 | (1) |
|
Sending Data to the Server |
|
|
384 | (1) |
|
|
384 | (1) |
|
|
385 | (1) |
|
|
385 | (2) |
|
|
386 | (1) |
|
|
386 | (1) |
|
Prepare for DoS and DDoS Attacks |
|
|
387 | (1) |
|
Computer and Operating System Security |
|
|
387 | (1) |
|
Keep the Operating System Up-to-Date |
|
|
387 | (1) |
|
Run Only What Is Necessary |
|
|
388 | (1) |
|
Physically Secure the Server |
|
|
388 | (1) |
|
|
388 | (2) |
|
|
390 | (1) |
|
Implementing Authentication with PHP and MySQL |
|
|
391 | (18) |
|
|
391 | (1) |
|
Implementing Access Control |
|
|
392 | (7) |
|
|
395 | (2) |
|
|
397 | (2) |
|
Protecting Multiple Pages |
|
|
399 | (1) |
|
Using Basic Authentication |
|
|
399 | (1) |
|
Using Basic Authentication in PHP |
|
|
400 | (2) |
|
Using Basic Authentication with Apache's .htaccess Files |
|
|
402 | (4) |
|
Using mod_auth_mysql Authentication |
|
|
406 | (2) |
|
Installing mod_auth_mysql |
|
|
406 | (1) |
|
|
407 | (1) |
|
Creating Your Own Custom Authentication |
|
|
408 | (1) |
|
|
408 | (1) |
|
|
408 | (1) |
|
Implementing Secure Transactions with PHP and MySQL |
|
|
409 | (22) |
|
Providing Secure Transactions |
|
|
409 | (4) |
|
|
410 | (1) |
|
|
411 | (1) |
|
|
412 | (1) |
|
Using Secure Sockets Layer (SSL) |
|
|
413 | (4) |
|
|
417 | (1) |
|
|
417 | (2) |
|
Storing Credit Card Numbers |
|
|
419 | (1) |
|
|
419 | (8) |
|
|
420 | (2) |
|
|
422 | (5) |
|
|
427 | (1) |
|
|
428 | (3) |
|
IV Advanced PHP Techniques |
|
|
|
Interacting with the File System and the Server |
|
|
431 | (20) |
|
|
431 | (8) |
|
|
433 | (1) |
|
Writing the PHP to Deal with the File |
|
|
434 | (4) |
|
Avoiding Common Upload Problems |
|
|
438 | (1) |
|
Using Directory Functions |
|
|
439 | (4) |
|
|
439 | (3) |
|
Getting Information About the current Directory |
|
|
442 | (1) |
|
Creating and Deleting Directories |
|
|
443 | (1) |
|
Interacting with the File System |
|
|
443 | (4) |
|
|
444 | (2) |
|
|
446 | (1) |
|
Creating, Deleting, and Moving Files |
|
|
447 | (1) |
|
Using Program Execution Functions |
|
|
447 | (3) |
|
Interacting with the Environment: getenv() and putenv() |
|
|
450 | (1) |
|
|
450 | (1) |
|
|
450 | (1) |
|
Using Network and Protocol Functions |
|
|
451 | (18) |
|
Examining Available Protocols |
|
|
451 | (1) |
|
Sending and Reading Email |
|
|
452 | (1) |
|
Using Data from Other Websites |
|
|
452 | (3) |
|
Using Network Lookup Functions |
|
|
455 | (4) |
|
Backing Up or Mirroring a File |
|
|
459 | (9) |
|
Using FTP to Back Up or Mirror a File |
|
|
459 | (7) |
|
|
466 | (1) |
|
|
467 | (1) |
|
Using Other FTP Functions |
|
|
467 | (1) |
|
|
468 | (1) |
|
|
468 | (1) |
|
Managing the Data and Time |
|
|
469 | (14) |
|
Getting the Date and Time from PHP |
|
|
469 | (7) |
|
Using the date() Function |
|
|
469 | (2) |
|
Dealing with Unix Timestamps |
|
|
471 | (2) |
|
Using the getdate() Function |
|
|
473 | (1) |
|
Validating Dates with checkdate() |
|
|
474 | (1) |
|
|
474 | (2) |
|
Converting Between PHP and MySQL Date Formates |
|
|
476 | (1) |
|
|
477 | (1) |
|
Calculating Dates In MySQL |
|
|
478 | (2) |
|
|
480 | (1) |
|
Using the Calendar Functions |
|
|
480 | (1) |
|
|
481 | (1) |
|
|
481 | (2) |
|
|
483 | (26) |
|
Setting Up Image Support in PHP |
|
|
484 | (1) |
|
Understanding Image Formats |
|
|
484 | (2) |
|
|
485 | (1) |
|
|
485 | (1) |
|
|
485 | (1) |
|
|
485 | (1) |
|
|
486 | (4) |
|
|
487 | (1) |
|
Drawing or Printing Text on the Image |
|
|
487 | (2) |
|
Outputting the Final Graphic |
|
|
489 | (1) |
|
|
490 | (1) |
|
Using Automatically Generated Images in Other Pages |
|
|
490 | (1) |
|
Using text and Fonts to Create Images |
|
|
491 | (8) |
|
Setting Up the Base Canvas |
|
|
495 | (1) |
|
Fitting the text onto the Button |
|
|
495 | (3) |
|
|
498 | (1) |
|
Writing the Text onto the Button |
|
|
499 | (1) |
|
|
499 | (1) |
|
Drawing Figures and Graphing Data |
|
|
499 | (8) |
|
Using Other Image Functions |
|
|
507 | (1) |
|
|
507 | (1) |
|
|
508 | (1) |
|
Using Session Control in PHP |
|
|
509 | (16) |
|
|
509 | (1) |
|
Understanding Basic Session Functionality |
|
|
509 | (3) |
|
|
510 | (1) |
|
|
510 | (1) |
|
Using Cookies with Sessions |
|
|
511 | (1) |
|
|
511 | (1) |
|
Implementing Simple Sessions |
|
|
512 | (2) |
|
|
512 | (1) |
|
Registeromg Session Variables |
|
|
513 | (1) |
|
|
513 | (1) |
|
Unsetting Variables and Destroying the Session |
|
|
513 | (1) |
|
Creating a Simple Session Example |
|
|
514 | (2) |
|
Configuring Session Control |
|
|
516 | (1) |
|
Implementing Authentication with Session Control |
|
|
517 | (7) |
|
|
524 | (1) |
|
|
524 | (1) |
|
|
525 | (10) |
|
Evaluating Strings: eval() |
|
|
252 | (274) |
|
Terminating Execution; die() and exit(0 |
|
|
526 | (1) |
|
Serializing Variables and Objects |
|
|
526 | (2) |
|
Getting Information about the PHP Environment |
|
|
528 | (1) |
|
Finding Out What Extensions Are Loaded |
|
|
528 | (1) |
|
Identifying the Script Owner |
|
|
529 | (1) |
|
Finding Out When the Script Was Modified |
|
|
529 | (1) |
|
Temporarily Altering the Runtime Environment |
|
|
529 | (1) |
|
|
530 | (1) |
|
Using PHP on the Command Line |
|
|
531 | (1) |
|
|
532 | (3) |
|
V Building Practical PHP and MySQL Project |
|
|
|
Using PHP and MySQL for Large Projects |
|
|
535 | (16) |
|
Applying Software Engineering to Web Development |
|
|
536 | (1) |
|
Planning and Running a Web Application Project |
|
|
536 | (1) |
|
|
537 | (1) |
|
Writing Maintainable Code |
|
|
538 | (4) |
|
|
538 | (3) |
|
|
541 | (1) |
|
Using a Standard Directory Structure |
|
|
542 | (1) |
|
Documenting and Sharing In-House Functions |
|
|
542 | (1) |
|
Implementing Version Control |
|
|
542 | (2) |
|
Choosing a Devleopment Environment |
|
|
544 | (1) |
|
|
544 | (1) |
|
|
545 | (1) |
|
Separating Logic and Content |
|
|
546 | (1) |
|
|
546 | (2) |
|
Using Simple Optimizations |
|
|
547 | (1) |
|
|
547 | (1) |
|
|
548 | (1) |
|
|
549 | (1) |
|
|
549 | (2) |
|
|
551 | (18) |
|
|
551 | (8) |
|
|
552 | (1) |
|
|
552 | (6) |
|
|
558 | (1) |
|
|
559 | (3) |
|
|
562 | (1) |
|
Altering the Error Reporting Settings |
|
|
563 | (1) |
|
Triggering Your Own Errors |
|
|
564 | (1) |
|
Handling Errors Gracefully |
|
|
565 | (2) |
|
|
567 | (2) |
|
Building User Authentication and Personalization |
|
|
569 | (38) |
|
|
569 | (2) |
|
User Identification and Personalization |
|
|
570 | (1) |
|
|
571 | (1) |
|
|
571 | (1) |
|
|
571 | (2) |
|
Implementing the Database |
|
|
573 | (1) |
|
Implementing the Basic Site |
|
|
574 | (3) |
|
Implementing User Authentication |
|
|
577 | (19) |
|
|
577 | (7) |
|
|
584 | (3) |
|
|
587 | (1) |
|
|
588 | (3) |
|
Resetting Forgotten Passwords |
|
|
591 | (5) |
|
Implementing Bookmark Storage and Retrieval |
|
|
596 | (6) |
|
|
596 | (3) |
|
|
599 | (1) |
|
|
600 | (2) |
|
Implementing Recommendations |
|
|
602 | (4) |
|
Considering Possible Exteneions |
|
|
606 | (1) |
|
|
606 | (1) |
|
|
607 | (44) |
|
|
607 | (2) |
|
Building an Online Catalog |
|
|
608 | (1) |
|
Tracking User's Purchases While They Shop |
|
|
608 | (1) |
|
Implementing a Payment System |
|
|
608 | (1) |
|
Building an Administration Interface |
|
|
609 | (1) |
|
|
609 | (3) |
|
Implementing the Database |
|
|
612 | (3) |
|
Implementing the Online Catalog |
|
|
615 | (8) |
|
|
617 | (3) |
|
Listign Books in a Category |
|
|
620 | (2) |
|
|
622 | (1) |
|
Implementing the Shopping Cart |
|
|
623 | (16) |
|
Using the Show_cart.php Script |
|
|
623 | (4) |
|
|
627 | (3) |
|
|
630 | (1) |
|
|
631 | (1) |
|
Printing a Header Bar Summary |
|
|
632 | (1) |
|
|
633 | (6) |
|
|
639 | (2) |
|
Implementing an Administration interface |
|
|
641 | (9) |
|
|
650 | (1) |
|
Using and Existing Systema |
|
|
650 | (1) |
|
|
650 | (1) |
|
Building a Web-Based Email Service |
|
|
651 | (36) |
|
|
651 | (3) |
|
Mail Protocols: POP3 Versus IMAP |
|
|
651 | (1) |
|
POP3 and IMAP Support in PHP |
|
|
652 | (16) |
|
|
654 | (1) |
|
|
655 | (2) |
|
Examination the Script Architecture |
|
|
657 | (6) |
|
|
663 | (3) |
|
|
666 | (5) |
|
|
668 | (2) |
|
Modifying an existing Account |
|
|
670 | (1) |
|
|
670 | (1) |
|
|
671 | (15) |
|
|
671 | (3) |
|
|
674 | (3) |
|
|
677 | (3) |
|
|
680 | (2) |
|
|
682 | (1) |
|
|
682 | (1) |
|
|
682 | (2) |
|
Replying to or Forwarding Mail |
|
|
684 | (2) |
|
|
686 | (1) |
|
|
686 | (1) |
|
Building a Mailing List Manager |
|
|
687 | (54) |
|
|
687 | (2) |
|
Setting Up a Database of list and Subscribers |
|
|
688 | (1) |
|
|
688 | (1) |
|
Sending Mail with Attachments |
|
|
689 | (1) |
|
|
689 | (3) |
|
|
692 | (2) |
|
Defining the Script Architecture |
|
|
694 | (8) |
|
|
702 | (6) |
|
|
702 | (3) |
|
|
705 | (3) |
|
Implementing User Functions |
|
|
708 | (13) |
|
|
708 | (5) |
|
Viewing List Informationa |
|
|
713 | (3) |
|
|
716 | (1) |
|
Subscribing and Unsubscribing |
|
|
717 | (2) |
|
Changing Account Settings |
|
|
719 | (1) |
|
|
719 | (2) |
|
|
721 | (1) |
|
Implementing Administrative Functions |
|
|
721 | (19) |
|
|
722 | (2) |
|
Uploading a New Newsletter |
|
|
724 | (3) |
|
Handling Multiple File Upload |
|
|
727 | (5) |
|
Previewing the Newsletter |
|
|
732 | (1) |
|
|
733 | (7) |
|
|
740 | (1) |
|
|
740 | (1) |
|
|
741 | (30) |
|
Understanding the Processa |
|
|
741 | (1) |
|
|
742 | (1) |
|
|
743 | (1) |
|
|
744 | (3) |
|
Viewing the tree of Articles |
|
|
747 | (13) |
|
Expanding and Collapsinga |
|
|
749 | (3) |
|
|
752 | (1) |
|
|
753 | (7) |
|
Viewing Individual Articles |
|
|
760 | (2) |
|
|
762 | (7) |
|
|
769 | (1) |
|
|
770 | (1) |
|
|
770 | (1) |
|
Generating Personalized PDF Documents |
|
|
771 | (36) |
|
|
771 | (5) |
|
Evaluating Document Formats |
|
|
772 | (4) |
|
|
776 | (2) |
|
Questions and Answer System |
|
|
776 | (1) |
|
Document Generation Software |
|
|
776 | (2) |
|
|
778 | (26) |
|
|
780 | (2) |
|
|
782 | (2) |
|
Generating an RTF Centificate |
|
|
784 | (4) |
|
Generating a PDF certificate from a template |
|
|
788 | (4) |
|
Generating a PDF Document Using PDFilb |
|
|
792 | (1) |
|
A Hello World Script for PDflib |
|
|
792 | (4) |
|
Generating a certificate with PDflib |
|
|
796 | (8) |
|
Handling Problems with Headers |
|
|
804 | (1) |
|
|
805 | (1) |
|
|
805 | (2) |
|
Connecting to Web Services with XML and SOAP |
|
|
807 | (48) |
|
Project Overview: Working with XML and Web Services |
|
|
807 | (6) |
|
|
808 | (3) |
|
Understanding Web Services |
|
|
811 | (2) |
|
|
813 | (2) |
|
Using Amazon's Web service Interfaces |
|
|
813 | (1) |
|
Parsing XML: REST Responses |
|
|
814 | (1) |
|
|
814 | (1) |
|
|
815 | (1) |
|
|
815 | (38) |
|
|
820 | (6) |
|
Showing Books in a category |
|
|
826 | (2) |
|
Getting an Amazon ResultSet Class |
|
|
828 | (10) |
|
Using REST to Make a Request and retrieve a Result |
|
|
838 | (7) |
|
Using SOAP to Make a Request and Restrieve a Result |
|
|
845 | (1) |
|
Caching the Data from a Request |
|
|
846 | (3) |
|
Building the Shopping Cart |
|
|
849 | (3) |
|
|
852 | (1) |
|
Installing the Project Code |
|
|
853 | (1) |
|
|
854 | (1) |
|
|
854 | (1) |
|
Building Web 2.0 Applications with Ajax |
|
|
855 | (56) |
|
|
856 | (4) |
|
HTTP Request and Responses |
|
|
856 | (1) |
|
|
857 | (1) |
|
Cascading Style Sheets (CSS) |
|
|
858 | (1) |
|
|
859 | (1) |
|
|
860 | (1) |
|
|
860 | (1) |
|
|
860 | (10) |
|
The XMLHTTPRequest Object |
|
|
860 | (2) |
|
Communicating with the Server |
|
|
862 | (2) |
|
Working with the Server Response |
|
|
864 | (2) |
|
|
866 | (4) |
|
Adding Ajax Elements to Earlier Projects |
|
|
870 | (14) |
|
Adding Ajax Elements to PHPbookmark |
|
|
870 | (14) |
|
|
884 | (5) |
|
Learning More about the Document Object Model (DOM) |
|
|
884 | (1) |
|
Java Script Libraries for Ajax Applications |
|
|
884 | (1) |
|
|
885 | (4) |
|
|
|
A Installing PHP and MySQL |
|
|
889 | (18) |
|
Installing Apache, PHP, and MySQL under Unix |
|
|
890 | (1) |
|
|
890 | (1) |
|
|
891 | (5) |
|
httpd.conf File: Snippets |
|
|
896 | (1) |
|
|
897 | (1) |
|
|
898 | (1) |
|
Installing Apache, PHP, and MySQL Under Windows |
|
|
899 | (1) |
|
Installing MySQL Under Windows |
|
|
900 | (1) |
|
Installing Apache Under Windows |
|
|
901 | (2) |
|
Installing PHP for Windows |
|
|
903 | (2) |
|
|
905 | (1) |
|
Setting Up Other Configurations |
|
|
906 | (1) |
|
|
907 | (4) |
|
|
907 | (2) |
|
MySQL and SQL Specific Resources |
|
|
909 | (1) |
|
|
909 | (1) |
|
|
910 | (1) |
Index |
|
911 | |