Introduction |
|
1 | (10) |
|
|
|
|
11 | (46) |
|
|
12 | (1) |
|
Creating a Sample Application: Bob's Auto Parts |
|
|
12 | (3) |
|
|
12 | (2) |
|
|
14 | (1) |
|
|
15 | (4) |
|
|
16 | (1) |
|
|
16 | (1) |
|
|
17 | (1) |
|
|
18 | (1) |
|
|
18 | (1) |
|
|
19 | (2) |
|
|
20 | (1) |
|
Using the date () Function |
|
|
20 | (1) |
|
|
21 | (5) |
|
|
21 | (3) |
|
|
24 | (1) |
|
|
25 | (1) |
|
Understanding Identifiers |
|
|
26 | (1) |
|
Creating User-Declared Variables |
|
|
26 | (1) |
|
Assigning Values to Variables |
|
|
26 | (1) |
|
|
27 | (2) |
|
|
27 | (1) |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
28 | (1) |
|
Declaring and Using Constants |
|
|
29 | (1) |
|
Understanding Variable Scope |
|
|
29 | (1) |
|
|
30 | (9) |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
32 | (2) |
|
|
34 | (2) |
|
|
36 | (1) |
|
|
36 | (1) |
|
|
37 | (2) |
|
Using Operators: Working Out the Form Totals |
|
|
39 | (1) |
|
Understanding Precedence and Associativity: Evaluating Expressions |
|
|
40 | (2) |
|
|
42 | (2) |
|
Testing and Setting Variable Types |
|
|
42 | (1) |
|
|
43 | (1) |
|
|
44 | (1) |
|
Implementing Control Structures |
|
|
44 | (1) |
|
Making Decisions with Conditionals |
|
|
44 | (5) |
|
|
44 | (1) |
|
|
45 | (1) |
|
|
45 | (1) |
|
|
46 | (1) |
|
|
47 | (2) |
|
Comparing the Different Conditionals |
|
|
49 | (1) |
|
Repeating Actions Through Iteration |
|
|
49 | (5) |
|
|
51 | (1) |
|
|
52 | (1) |
|
|
53 | (1) |
|
Breaking Out of a Control Structure or Script |
|
|
54 | (1) |
|
Employing Alternative Control Structure Syntax |
|
|
54 | (1) |
|
|
55 | (1) |
|
Next: Saving the Customer's Order |
|
|
55 | (2) |
|
Storing and Retrieving Data |
|
|
57 | (22) |
|
|
57 | (1) |
|
Storing and Retrieving Bob's Orders |
|
|
58 | (1) |
|
|
59 | (1) |
|
|
59 | (6) |
|
|
59 | (1) |
|
Using fopen () to Open a File |
|
|
60 | (2) |
|
Opening Files Through FTP or HTTP |
|
|
62 | (1) |
|
Addressing Problems Opening Files |
|
|
63 | (2) |
|
|
65 | (2) |
|
|
66 | (1) |
|
|
66 | (1) |
|
|
67 | (2) |
|
|
69 | (5) |
|
Opening a File for Reading: fopen () |
|
|
70 | (1) |
|
Knowing When to Stop: feof () |
|
|
71 | (1) |
|
Reading a Line at a Time: fgets (), fgetss (), and fgetcsv () |
|
|
71 | (1) |
|
Reading the Whole File: readfile (), fpassthru (), and file () |
|
|
72 | (1) |
|
Reading a Character: fgetc () |
|
|
73 | (1) |
|
Reading an Arbitrary Length: fread () |
|
|
73 | (1) |
|
Using Other Useful File Functions |
|
|
74 | (2) |
|
Checking Whether a File Is There: file_exists () |
|
|
74 | (1) |
|
Determining How Big a File Is: filesize () |
|
|
74 | (1) |
|
Deleting a File: unlink () |
|
|
74 | (1) |
|
Navigating Inside a File: rewind (), fseek (), and ftell () |
|
|
74 | (2) |
|
|
76 | (1) |
|
Doing It a Better Way: Database Management Systems |
|
|
77 | (1) |
|
Problems with Using Flat Files |
|
|
77 | (1) |
|
How RDBMSs Solve These Problems |
|
|
78 | (1) |
|
|
78 | (1) |
|
|
78 | (1) |
|
|
79 | (26) |
|
|
79 | (1) |
|
Numerically Indexed Arrays |
|
|
80 | (3) |
|
Initializing Numerically Indexed Arrays |
|
|
80 | (1) |
|
|
81 | (1) |
|
Using Loops to Access the Array |
|
|
82 | (1) |
|
Arrays with Different Indices |
|
|
83 | (2) |
|
|
83 | (1) |
|
Accessing the Array Elements |
|
|
83 | (1) |
|
|
83 | (2) |
|
|
85 | (1) |
|
|
86 | (4) |
|
|
90 | (1) |
|
|
90 | (1) |
|
Using asort () and ksort () to Sort Arrays |
|
|
91 | (1) |
|
|
91 | (1) |
|
Sorting Multidimensional Arrays |
|
|
91 | (3) |
|
|
91 | (2) |
|
|
93 | (1) |
|
|
94 | (2) |
|
|
94 | (2) |
|
|
96 | (1) |
|
Loading Arrays from Files |
|
|
96 | (4) |
|
Performing Other Array Manipulations |
|
|
100 | (4) |
|
Navigating Within an Array: each (), current (), reset (), end (), next (), pos (), and prev () |
|
|
100 | (1) |
|
Applying Any Function to Each Elements in an Array: array_walk () |
|
|
101 | (1) |
|
Counting Elements in an Array: count (), sizeof (), and array_count_values () |
|
|
102 | (1) |
|
Converting Arrays to Scalar Variables: extract () |
|
|
103 | (1) |
|
|
104 | (1) |
|
|
104 | (1) |
|
String Manipulation and Regular Expressions |
|
|
105 | (24) |
|
Creating a Sample Application: Smart Form Mail |
|
|
105 | (2) |
|
|
107 | (6) |
|
Trimming Strings: chop (), ltrim (), and trim () |
|
|
108 | (1) |
|
Formatting Strings for Presentation |
|
|
108 | (4) |
|
Formatting Strings for Storage: addslashes () and stripslashes () |
|
|
112 | (1) |
|
Joining and Splitting Strings with String Functions |
|
|
113 | (3) |
|
Using explode (), implode (), and join () |
|
|
114 | (1) |
|
|
114 | (1) |
|
|
115 | (1) |
|
|
116 | (1) |
|
Performing String Ordering: strcmp (), strcasecmp (), and strnatcmp () |
|
|
116 | (1) |
|
Testing String Length with strlen () |
|
|
117 | (1) |
|
Matching and Replacing Substrings with String Functions |
|
|
117 | (4) |
|
Finding Strings in Strings: strstr (), strchr (), strrchr (), and stristr () |
|
|
118 | (1) |
|
Finding the Position of a Substring: strpos () and strrpos () |
|
|
118 | (1) |
|
Replacing Substrings: str_replace () and substr_replace () |
|
|
119 | (2) |
|
Introducing Regular Expressions |
|
|
121 | (5) |
|
|
121 | (1) |
|
Character Sets and Classes |
|
|
121 | (2) |
|
|
123 | (1) |
|
|
123 | (1) |
|
|
123 | (1) |
|
Anchoring to the Beginning or End of a String |
|
|
123 | (1) |
|
|
124 | (1) |
|
Matching Literal Special Characters |
|
|
124 | (1) |
|
Reviewing the Special Characters |
|
|
124 | (1) |
|
Putting It All Together for the Smart Form |
|
|
125 | (1) |
|
Finding Substrings with Regular Expressions |
|
|
126 | (1) |
|
Replacing Substrings with Regular Expressions |
|
|
127 | (1) |
|
Splitting Strings with Regular Expressions |
|
|
127 | (1) |
|
Comparing String Functions and Regular Expression Functions |
|
|
127 | (1) |
|
|
128 | (1) |
|
|
128 | (1) |
|
Reusing Code and Writing Functions |
|
|
129 | (28) |
|
|
129 | (1) |
|
|
130 | (1) |
|
|
130 | (1) |
|
|
130 | (1) |
|
Using require () and include () |
|
|
130 | (3) |
|
|
131 | (1) |
|
Filename Extensions and require () |
|
|
132 | (1) |
|
|
132 | (1) |
|
Using require () for Website Templates |
|
|
133 | (6) |
|
|
138 | (1) |
|
Using require_once () and include_once () |
|
|
138 | (1) |
|
Using auto_prepend_file and auto_append_file |
|
|
138 | (1) |
|
|
139 | (3) |
|
|
139 | (2) |
|
Calling an Undefined Function |
|
|
141 | (1) |
|
Understanding Case and Function Names |
|
|
142 | (1) |
|
Understanding Why You Should Define Your Own Functions |
|
|
142 | (1) |
|
Examining Basic Function Structure |
|
|
142 | (2) |
|
|
143 | (1) |
|
|
144 | (2) |
|
|
146 | (3) |
|
Passing by Reference Versus Passing by Value |
|
|
149 | (1) |
|
|
150 | (1) |
|
Returning Values from Functions |
|
|
151 | (2) |
|
|
152 | (1) |
|
|
153 | (2) |
|
|
155 | (1) |
|
|
155 | (2) |
|
|
157 | (34) |
|
Understanding Object-Oriented Concepts |
|
|
158 | (2) |
|
|
158 | (1) |
|
|
159 | (1) |
|
|
160 | (1) |
|
Creating Classes, Attributes, and Operations in PHP |
|
|
160 | (2) |
|
|
160 | (1) |
|
|
161 | (1) |
|
|
161 | (1) |
|
|
162 | (1) |
|
|
162 | (2) |
|
Controlling Access with private and public |
|
|
164 | (1) |
|
|
165 | (1) |
|
Implementing Inheritance in PHP |
|
|
166 | (6) |
|
Controlling Visibility Through Inheritance with private and protected |
|
|
167 | (1) |
|
|
168 | (2) |
|
Preventing Inheritance and Overriding with final |
|
|
170 | (1) |
|
Understanding Multiple Inheritance |
|
|
171 | (1) |
|
|
171 | (1) |
|
|
172 | (1) |
|
Writing the Code for Your Class |
|
|
173 | (8) |
|
Understanding Advanced and New Object-Oriented Functionality in PHP |
|
|
181 | (9) |
|
|
182 | (1) |
|
Using Per-Class Constants |
|
|
182 | (1) |
|
Implementing Static Methods |
|
|
182 | (1) |
|
Checking Class Type and Type Hinting |
|
|
183 | (1) |
|
|
184 | (1) |
|
|
184 | (1) |
|
Overloading Methods with__call () |
|
|
184 | (1) |
|
|
185 | (1) |
|
Implementing Iterators and Iteration |
|
|
186 | (2) |
|
Converting Your Classes to Strings |
|
|
188 | (1) |
|
|
188 | (2) |
|
|
190 | (1) |
|
|
191 | (14) |
|
Exception Handling Concepts |
|
|
191 | (2) |
|
|
193 | (1) |
|
|
194 | (3) |
|
Exceptions in Bob's Auto Parts |
|
|
197 | (3) |
|
Exceptions and PHP's Other Error Handling Mechanisms |
|
|
200 | (1) |
|
|
201 | (1) |
|
|
201 | (4) |
|
|
|
Designing Your Web Database |
|
|
205 | (12) |
|
Relational Database Concepts |
|
|
206 | (3) |
|
|
206 | (1) |
|
|
207 | (1) |
|
|
207 | (1) |
|
|
207 | (1) |
|
|
207 | (1) |
|
|
208 | (1) |
|
|
209 | (1) |
|
How to Design Your Web Database |
|
|
209 | (5) |
|
Think About the Real-World Objects You Are Modeling |
|
|
209 | (1) |
|
Avoid Storing Redundant Data |
|
|
210 | (2) |
|
|
212 | (1) |
|
|
213 | (1) |
|
Think About the Questions You Want to Ask the Database |
|
|
213 | (1) |
|
Avoid Designs with Many Empty Attributes |
|
|
213 | (1) |
|
|
214 | (1) |
|
Web Database Architecture |
|
|
214 | (2) |
|
|
214 | (2) |
|
|
216 | (1) |
|
|
216 | (1) |
|
Creating Your Web Database |
|
|
217 | (24) |
|
|
218 | (1) |
|
|
219 | (1) |
|
Creating Databases and Users |
|
|
220 | (1) |
|
|
220 | (1) |
|
Setting Up Users and Privileges |
|
|
221 | (1) |
|
Introducing MySQL's Privilege System |
|
|
221 | (5) |
|
Principle of Least Privilege |
|
|
221 | (1) |
|
User Setup: The GRANT Command |
|
|
221 | (2) |
|
Types and Levels of Privileges |
|
|
223 | (2) |
|
|
225 | (1) |
|
Examples Using GRANT and REVOKE |
|
|
225 | (1) |
|
Setting Up a User for the Web |
|
|
226 | (1) |
|
|
227 | (1) |
|
|
227 | (1) |
|
|
227 | (6) |
|
Understanding What the Other Keywords Mean |
|
|
229 | (1) |
|
Understanding the Column Types |
|
|
230 | (1) |
|
Looking at the Database with Show and Describe |
|
|
231 | (1) |
|
|
232 | (1) |
|
|
233 | (1) |
|
Understanding MySQL Identifiers |
|
|
233 | (1) |
|
Choosing Column Data Types |
|
|
234 | (5) |
|
|
235 | (4) |
|
|
239 | (1) |
|
|
239 | (2) |
|
Working with Your MySQL Database |
|
|
241 | (24) |
|
|
241 | (1) |
|
Inserting Data into the Database |
|
|
242 | (2) |
|
Retrieving Data from the Database |
|
|
244 | (15) |
|
Retrieving Data with Specific Criteria |
|
|
246 | (1) |
|
Retrieving Data from Multiple Tables |
|
|
247 | (6) |
|
Retrieving Data in a Particular Order |
|
|
253 | (1) |
|
Grouping and Aggregating Data |
|
|
254 | (2) |
|
Choosing Which Rows to Return |
|
|
256 | (1) |
|
|
256 | (3) |
|
Updating Records in the Database |
|
|
259 | (1) |
|
Altering Tables After Creation |
|
|
259 | (3) |
|
Deleting Records from the Database |
|
|
262 | (1) |
|
|
262 | (1) |
|
Dropping a Whole Database |
|
|
262 | (1) |
|
|
263 | (1) |
|
|
263 | (2) |
|
Accessing Your MySQL Database from the Web with PHP |
|
|
265 | (20) |
|
How Web Database Architectures Work |
|
|
266 | (3) |
|
Querying a Database from the Web |
|
|
269 | (1) |
|
Checking and Filtering Input Data |
|
|
270 | (1) |
|
|
271 | (1) |
|
Choosing a Database to Use |
|
|
272 | (1) |
|
|
272 | (1) |
|
Retrieving the Query Results |
|
|
273 | (1) |
|
Disconnecting from the Database |
|
|
274 | (1) |
|
Putting New Information in the Database |
|
|
275 | (3) |
|
Using Prepared Statements |
|
|
278 | (2) |
|
Using Other PHP-Database Interfaces |
|
|
280 | (1) |
|
Using a Generic Database Interface: PEAR DB |
|
|
280 | (3) |
|
|
283 | (1) |
|
|
283 | (2) |
|
Advanced MySQL Administration |
|
|
285 | (22) |
|
Understanding the Privilege System in Detail |
|
|
285 | (6) |
|
|
286 | (2) |
|
|
288 | (1) |
|
The tables_priv and columns_priv Tables |
|
|
289 | (1) |
|
Access Control: How MySQL Uses the Grant Tables |
|
|
290 | (1) |
|
Updating Privileges: When Do Changes Take Effect? |
|
|
290 | (1) |
|
Making Your MySQL Database Secure |
|
|
291 | (2) |
|
MySQL from the Operating System's Point of View |
|
|
291 | (1) |
|
|
291 | (1) |
|
|
292 | (1) |
|
|
293 | (1) |
|
Getting More Information About Databases |
|
|
293 | (8) |
|
Getting Information with SHOW |
|
|
293 | (3) |
|
Getting Information About Columns with Describe |
|
|
296 | (1) |
|
Understanding How Queries Work with EXPLAIN |
|
|
296 | (5) |
|
Speeding Up Queries with Indexes |
|
|
301 | (1) |
|
|
301 | (1) |
|
|
301 | (1) |
|
|
301 | (1) |
|
|
301 | (1) |
|
|
302 | (1) |
|
|
302 | (1) |
|
|
302 | (1) |
|
Backing Up Your MySQL Database |
|
|
302 | (1) |
|
Restoring Your MySQL Database |
|
|
303 | (1) |
|
|
303 | (3) |
|
|
304 | (1) |
|
Performing the Initial Data Transfer |
|
|
304 | (1) |
|
Setting Up the Slave or Slaves |
|
|
305 | (1) |
|
|
306 | (1) |
|
|
306 | (1) |
|
Advanced MySQL Programming |
|
|
307 | (16) |
|
The LOAD DATA INFILE Statement |
|
|
307 | (1) |
|
|
308 | (1) |
|
|
309 | (2) |
|
Understanding Transaction Definitions |
|
|
309 | (1) |
|
Using Transactions with InnoDB |
|
|
310 | (1) |
|
|
311 | (1) |
|
|
312 | (7) |
|
|
312 | (3) |
|
|
315 | (1) |
|
Cursors and Control Structures |
|
|
315 | (4) |
|
|
319 | (1) |
|
|
319 | (4) |
|
III E-commerce and Security |
|
|
|
Running an E-commerce Site |
|
|
323 | (14) |
|
Deciding What You Want to Achieve |
|
|
323 | (1) |
|
Considering the Types of Commercial Websites |
|
|
323 | (9) |
|
Publishing Information Using Online Brochures |
|
|
324 | (3) |
|
Taking Orders for Goods or Services |
|
|
327 | (3) |
|
Providing Services and Digital Goods |
|
|
330 | (1) |
|
Adding Value to Goods or Services |
|
|
331 | (1) |
|
|
331 | (1) |
|
Understanding Risks and Threats |
|
|
332 | (3) |
|
|
333 | (1) |
|
Failure to Attract Sufficient Business |
|
|
333 | (1) |
|
Computer Hardware Failure |
|
|
333 | (1) |
|
Power, Communication, Network, or Shipping Failures |
|
|
334 | (1) |
|
|
334 | (1) |
|
|
334 | (1) |
|
Evolving Governmental Policies and Taxes |
|
|
335 | (1) |
|
|
335 | (1) |
|
|
335 | (1) |
|
|
335 | (2) |
|
E-commerce Security Issues |
|
|
337 | (20) |
|
How Important Is Your Information? |
|
|
338 | (1) |
|
|
338 | (7) |
|
Exposure of Confidential Data |
|
|
339 | (1) |
|
Loss or Destruction of Data |
|
|
340 | (1) |
|
|
341 | (1) |
|
|
342 | (1) |
|
|
343 | (1) |
|
|
344 | (1) |
|
Usability, Performance, Cost, and Security |
|
|
345 | (1) |
|
|
345 | (1) |
|
Authentication Principles |
|
|
346 | (1) |
|
|
347 | (1) |
|
|
347 | (2) |
|
|
349 | (1) |
|
|
349 | (1) |
|
|
350 | (1) |
|
|
351 | (1) |
|
|
352 | (1) |
|
|
353 | (1) |
|
|
353 | (1) |
|
|
354 | (1) |
|
|
354 | (1) |
|
Backing Up and Restoring Your MySQL Database |
|
|
354 | (1) |
|
|
355 | (1) |
|
|
355 | (2) |
|
Implementing Authentication with PHP and MySQL |
|
|
357 | (22) |
|
|
357 | (1) |
|
Implementing Access Control |
|
|
358 | (8) |
|
|
361 | (3) |
|
|
364 | (1) |
|
Protecting Multiple Pages |
|
|
365 | (1) |
|
Using Basic Authentication |
|
|
366 | (1) |
|
Using Basic Authentication in PHP |
|
|
367 | (2) |
|
Using Basic Authentication with Apache's .htaccess Files |
|
|
369 | (4) |
|
Using Basic Authentication with IIS |
|
|
373 | (2) |
|
Using mod_auth_mysql Authentication |
|
|
375 | (2) |
|
Installing mod_auth_mysql |
|
|
375 | (1) |
|
|
376 | (1) |
|
|
376 | (1) |
|
Creating Your Own Custom Authentication |
|
|
377 | (1) |
|
|
378 | (1) |
|
|
378 | (1) |
|
Implementing Secure Transactions with PHP and MySQL |
|
|
379 | (22) |
|
Providing Secure Transactions |
|
|
379 | (4) |
|
|
380 | (1) |
|
|
381 | (1) |
|
|
382 | (1) |
|
Using Secure Sockets Layer (SSL) |
|
|
383 | (4) |
|
|
387 | (1) |
|
|
387 | (2) |
|
Determining Whether to Store Credit Card Numbers |
|
|
389 | (1) |
|
|
389 | (8) |
|
|
397 | (1) |
|
|
398 | (3) |
|
IV Advanced PHP Techniques |
|
|
|
Interacting with the File System and the Server |
|
|
401 | (18) |
|
|
401 | (7) |
|
|
402 | (1) |
|
|
403 | (1) |
|
Writing the PHP to Deal with the File |
|
|
403 | (4) |
|
|
407 | (1) |
|
Using Directory Functions |
|
|
408 | (3) |
|
|
408 | (2) |
|
Getting Information About the Current Directory |
|
|
410 | (1) |
|
Creating and Deleting Directories |
|
|
410 | (1) |
|
Interacting with the File System |
|
|
411 | (4) |
|
|
411 | (3) |
|
|
414 | (1) |
|
Creating, Deleting, and Moving Files |
|
|
414 | (1) |
|
Using Program Execution Functions |
|
|
415 | (2) |
|
Interacting with the Environment: getenv () and putenv () |
|
|
417 | (1) |
|
|
418 | (1) |
|
|
418 | (1) |
|
Using Network and Protocol Functions |
|
|
419 | (20) |
|
Examining Available Protocols |
|
|
419 | (1) |
|
Sending and Reading Email |
|
|
420 | (1) |
|
|
420 | (4) |
|
Using Network Lookup Functions |
|
|
424 | (4) |
|
|
428 | (9) |
|
Using FTP to Back Up or Mirror a File |
|
|
428 | (7) |
|
|
435 | (1) |
|
|
435 | (1) |
|
Using Other FTP Functions |
|
|
436 | (1) |
|
|
437 | (1) |
|
|
437 | (2) |
|
Managing the Date and Time |
|
|
439 | (12) |
|
Getting the Date and Time from PHP |
|
|
439 | (5) |
|
Using the date () Function |
|
|
439 | (2) |
|
Dealing with Unix Timestamps |
|
|
441 | (1) |
|
Using the getdate () Function |
|
|
442 | (1) |
|
|
443 | (1) |
|
Converting Between PHP and MySQL Date Formats |
|
|
444 | (1) |
|
|
445 | (1) |
|
Calculating Dates in MySQL |
|
|
446 | (2) |
|
|
448 | (1) |
|
Using the Calendar Functions |
|
|
448 | (1) |
|
|
449 | (1) |
|
|
449 | (2) |
|
|
451 | (28) |
|
Setting Up Image Support in PHP |
|
|
452 | (1) |
|
Understanding Image Formats |
|
|
452 | (2) |
|
|
452 | (1) |
|
|
453 | (1) |
|
|
453 | (1) |
|
|
453 | (1) |
|
|
454 | (5) |
|
|
455 | (1) |
|
Drawing or Printing Text on the Image |
|
|
456 | (2) |
|
Outputting the Final Graphic |
|
|
458 | (1) |
|
|
459 | (1) |
|
Using Automatically Generated Images in Other Pages |
|
|
459 | (1) |
|
Using Text and Fonts to Create Images |
|
|
460 | (8) |
|
Setting Up the Base Canvas |
|
|
463 | (1) |
|
Fitting the Text onto the Button |
|
|
464 | (3) |
|
|
467 | (1) |
|
Writing the Text onto the Button |
|
|
467 | (1) |
|
|
468 | (1) |
|
Drawing Figures and Graphing Data |
|
|
468 | (8) |
|
Using Other Image Functions |
|
|
476 | (1) |
|
|
477 | (1) |
|
|
477 | (2) |
|
Using Session Control in PHP |
|
|
479 | (16) |
|
|
479 | (1) |
|
Understanding Basic Session Functionality |
|
|
479 | (3) |
|
|
480 | (1) |
|
|
480 | (1) |
|
Using Cookies with Sessions |
|
|
481 | (1) |
|
|
481 | (1) |
|
Implementing Simple Sessions |
|
|
482 | (2) |
|
|
482 | (1) |
|
Registering Session Variables |
|
|
482 | (1) |
|
|
483 | (1) |
|
Unsetting Variables and Destroying the Session |
|
|
483 | (1) |
|
Creating a Simple Session Example |
|
|
484 | (2) |
|
Configuring Session Control |
|
|
486 | (1) |
|
Implementing Authentication with Session Control |
|
|
487 | (6) |
|
|
493 | (1) |
|
|
494 | (1) |
|
|
495 | (12) |
|
|
495 | (1) |
|
Evaluating Strings: eval () |
|
|
496 | (1) |
|
Terminating Execution: die and exit |
|
|
497 | (1) |
|
Serializing Variables and Objects |
|
|
497 | (2) |
|
Getting Information About the PHP Environment |
|
|
499 | (1) |
|
Finding Out What Extensions Are Loaded |
|
|
499 | (1) |
|
Identifying the Script Owner |
|
|
500 | (1) |
|
Finding Out When the Script Was Modified |
|
|
500 | (1) |
|
Loading Extensions Dynamically |
|
|
500 | (1) |
|
Temporarily Altering the Runtime Environment |
|
|
500 | (1) |
|
|
501 | (1) |
|
Using PHP on the Command Line |
|
|
502 | (1) |
|
|
503 | (4) |
|
V Building Practical PHP and MySQL Projects |
|
|
|
Using PHP and MySQL for Large Projects |
|
|
507 | (16) |
|
Applying Software Engineering to Web Development |
|
|
508 | (1) |
|
Planning and Running a Web Application Project |
|
|
508 | (1) |
|
|
509 | (1) |
|
Writing Maintainable Code |
|
|
510 | (4) |
|
|
510 | (3) |
|
|
513 | (1) |
|
Using a Standard Directory Structure |
|
|
514 | (1) |
|
Documenting and Sharing In-House Functions |
|
|
514 | (1) |
|
Implementing Version Control |
|
|
514 | (2) |
|
Choosing a Development Environment |
|
|
516 | (1) |
|
Documenting Your Projects |
|
|
516 | (1) |
|
|
517 | (1) |
|
Separating Logic and Content |
|
|
518 | (1) |
|
|
518 | (2) |
|
Using Simple Optimizations |
|
|
519 | (1) |
|
|
519 | (1) |
|
|
520 | (1) |
|
|
521 | (1) |
|
|
521 | (2) |
|
|
523 | (18) |
|
|
523 | (8) |
|
|
524 | (1) |
|
|
525 | (5) |
|
|
530 | (1) |
|
|
531 | (2) |
|
|
533 | (1) |
|
Altering the Error Reporting Settings |
|
|
534 | (2) |
|
Triggering Your Own Errors |
|
|
536 | (1) |
|
Handling Errors Gracefully |
|
|
536 | (3) |
|
|
539 | (2) |
|
Building User Authentication and Personalization |
|
|
541 | (38) |
|
|
541 | (1) |
|
|
542 | (1) |
|
User Identification and Personalization |
|
|
542 | (1) |
|
|
543 | (1) |
|
|
543 | (1) |
|
|
543 | (2) |
|
Implementing the Database |
|
|
545 | (1) |
|
Implementing the Basic Site |
|
|
546 | (3) |
|
Implementing User Authentication |
|
|
549 | (19) |
|
|
549 | (7) |
|
|
556 | (4) |
|
|
560 | (1) |
|
|
561 | (2) |
|
Resetting Forgotten Passwords |
|
|
563 | (5) |
|
Implementing Bookmark Storage and Retrieval |
|
|
568 | (6) |
|
|
568 | (2) |
|
|
570 | (1) |
|
|
571 | (3) |
|
Implementing Recommendations |
|
|
574 | (4) |
|
Wrapping Up and Considering Possible Extensions |
|
|
578 | (1) |
|
|
578 | (1) |
|
|
579 | (46) |
|
|
579 | (1) |
|
|
580 | (1) |
|
Building an Online Catalog |
|
|
580 | (1) |
|
Tracking Users' Purchases While They Shop |
|
|
580 | (1) |
|
Implementing a Payment System |
|
|
580 | (1) |
|
Building an Administration Interface |
|
|
581 | (1) |
|
|
581 | (4) |
|
Implementing the Database |
|
|
585 | (2) |
|
Implementing the Online Catalog |
|
|
587 | (8) |
|
|
589 | (3) |
|
Listing Books in a Category |
|
|
592 | (2) |
|
|
594 | (1) |
|
Implementing the Shopping Cart |
|
|
595 | (16) |
|
Using the show_cart.php Script |
|
|
596 | (3) |
|
|
599 | (3) |
|
|
602 | (2) |
|
|
604 | (1) |
|
Printing a Header Bar Summary |
|
|
604 | (1) |
|
|
605 | (6) |
|
|
611 | (2) |
|
Implementing an Administration Interface |
|
|
613 | (9) |
|
|
622 | (1) |
|
|
622 | (1) |
|
|
623 | (2) |
|
Building a Content Management System |
|
|
625 | (32) |
|
|
625 | (1) |
|
|
626 | (1) |
|
|
626 | (1) |
|
|
626 | (2) |
|
Getting Content into the System |
|
|
626 | (1) |
|
Databases Versus File Storage |
|
|
627 | (1) |
|
|
627 | (1) |
|
|
628 | (1) |
|
|
629 | (1) |
|
|
630 | (1) |
|
|
631 | (2) |
|
|
633 | (22) |
|
|
633 | (7) |
|
|
640 | (10) |
|
|
650 | (3) |
|
|
653 | (2) |
|
|
655 | (1) |
|
|
655 | (2) |
|
Building a Web-Based Email Service |
|
|
657 | (38) |
|
|
657 | (1) |
|
|
658 | (1) |
|
|
659 | (2) |
|
|
661 | (2) |
|
Examining the Script Architecture |
|
|
663 | (6) |
|
|
669 | (3) |
|
|
672 | (5) |
|
|
674 | (2) |
|
Modifying an Existing Account |
|
|
676 | (1) |
|
|
676 | (1) |
|
|
677 | (11) |
|
|
677 | (3) |
|
|
680 | (3) |
|
|
683 | (3) |
|
|
686 | (1) |
|
|
687 | (1) |
|
|
688 | (4) |
|
|
688 | (3) |
|
Replying To or Forwarding Mail |
|
|
691 | (1) |
|
|
692 | (1) |
|
|
693 | (2) |
|
Building a Mailing List Manager |
|
|
695 | (56) |
|
|
695 | (1) |
|
|
696 | (1) |
|
Setting Up a Database of Lists and Subscribers |
|
|
696 | (1) |
|
|
696 | (1) |
|
Sending Mail with Attachments |
|
|
697 | (1) |
|
|
697 | (3) |
|
|
700 | (2) |
|
Defining the Script Architecture |
|
|
702 | (9) |
|
|
711 | (6) |
|
|
711 | (3) |
|
|
714 | (3) |
|
Implementing User Functions |
|
|
717 | (14) |
|
|
717 | (6) |
|
|
723 | (2) |
|
|
725 | (1) |
|
Subscribing and Unsubscribing |
|
|
726 | (2) |
|
Changing Account Settings |
|
|
728 | (1) |
|
|
728 | (2) |
|
|
730 | (1) |
|
Implementing Administrative Functions |
|
|
731 | (18) |
|
|
731 | (3) |
|
Uploading a New Newsletter |
|
|
734 | (2) |
|
Handling Multiple File Upload |
|
|
736 | (5) |
|
Previewing the Newsletter |
|
|
741 | (2) |
|
|
743 | (6) |
|
|
749 | (1) |
|
|
750 | (1) |
|
|
751 | (32) |
|
|
751 | (1) |
|
|
752 | (1) |
|
|
753 | (1) |
|
|
754 | (3) |
|
Viewing the Tree of Articles |
|
|
757 | (13) |
|
|
759 | (3) |
|
|
762 | (1) |
|
|
763 | (7) |
|
Viewing Individual Articles |
|
|
770 | (3) |
|
|
773 | (7) |
|
|
780 | (1) |
|
|
780 | (1) |
|
|
781 | (2) |
|
Generating Personalized Documents in Portable Documents Format (PDF) |
|
|
783 | (36) |
|
|
783 | (5) |
|
Evaluating Document Formats |
|
|
784 | (4) |
|
|
788 | (3) |
|
Question and Answer System |
|
|
788 | (1) |
|
Document Generation Software |
|
|
788 | (3) |
|
|
791 | (25) |
|
|
792 | (2) |
|
|
794 | (2) |
|
Generating an RTF Certificate |
|
|
796 | (4) |
|
Generating a PDF Certificate from a Template |
|
|
800 | (3) |
|
Generating a PDF Document Using PDFlib |
|
|
803 | (1) |
|
A Hello World Script for PDFlib |
|
|
803 | (5) |
|
Generating a Certificate with PDFlib |
|
|
808 | (8) |
|
Handling Problems with Headers |
|
|
816 | (1) |
|
|
817 | (1) |
|
|
817 | (1) |
|
|
817 | (2) |
|
Connecting to Web Services with XML and SOAP |
|
|
819 | (48) |
|
|
819 | (7) |
|
|
820 | (4) |
|
Understanding Web Services |
|
|
824 | (2) |
|
|
826 | (2) |
|
|
826 | (1) |
|
Using Amazon's Web Services Interfaces |
|
|
826 | (1) |
|
|
827 | (1) |
|
|
827 | (1) |
|
|
828 | (1) |
|
|
828 | (35) |
|
|
833 | (6) |
|
Showing Books in a Category |
|
|
839 | (2) |
|
Getting an AmazonResultSet Class |
|
|
841 | (8) |
|
|
849 | (5) |
|
|
854 | (2) |
|
|
856 | (2) |
|
Building the Shopping Cart |
|
|
858 | (4) |
|
|
862 | (1) |
|
Installing the Project Code |
|
|
863 | (1) |
|
|
863 | (1) |
|
|
864 | (3) |
|
|
|
A Installing PHP and MySQL |
|
|
867 | (22) |
|
Running PHP as a CGI Interpreter or Module |
|
|
868 | (1) |
|
Installing Apache, PHP, and MySQL Under Unix |
|
|
868 | (10) |
|
|
868 | (1) |
|
|
868 | (7) |
|
httpd.conf File: Snippets |
|
|
875 | (1) |
|
|
876 | (1) |
|
|
877 | (1) |
|
Installing Apache, PHP, and MySQL Under Windows |
|
|
878 | (9) |
|
Installing MySQL Under Windows |
|
|
879 | (3) |
|
Installing Apache Under Windows |
|
|
882 | (2) |
|
Installing PHP for Windows |
|
|
884 | (3) |
|
|
887 | (1) |
|
Setting Up Other Configurations |
|
|
888 | (1) |
|
|
889 | (4) |
|
|
889 | (2) |
|
MySQL and SQL Specific Resources |
|
|
891 | (1) |
|
|
891 | (1) |
|
|
892 | (1) |
Index |
|
893 | |