Preface |
|
xi | |
|
1. Orientation and First Steps |
|
|
1 | (15) |
|
PHP's Place in the Web World |
|
|
1 | (3) |
|
What's So Great About PHP? |
|
|
4 | (2) |
|
|
6 | (5) |
|
Basic Rules of PHP Programs |
|
|
11 | (4) |
|
|
15 | (1) |
|
2. Working with Text and Numbers |
|
|
16 | (17) |
|
|
16 | (9) |
|
|
25 | (2) |
|
|
27 | (4) |
|
|
31 | (1) |
|
|
32 | (1) |
|
3. Making Decisions and Repeating Yourself |
|
|
33 | (15) |
|
Understanding true and false |
|
|
34 | (1) |
|
|
35 | (2) |
|
Building Complicated Decisions |
|
|
37 | (6) |
|
|
43 | (3) |
|
|
46 | (1) |
|
|
46 | (2) |
|
|
48 | (21) |
|
|
48 | (4) |
|
|
52 | (5) |
|
|
57 | (3) |
|
|
60 | (3) |
|
Using Multidimensional Arrays |
|
|
63 | (3) |
|
|
66 | (1) |
|
|
67 | (2) |
|
|
69 | (15) |
|
Declaring and Calling Functions |
|
|
70 | (1) |
|
Passing Arguments to Functions |
|
|
71 | (3) |
|
Returning Values from Functions |
|
|
74 | (4) |
|
Understanding Variable Scope |
|
|
78 | (4) |
|
|
82 | (1) |
|
|
82 | (2) |
|
|
84 | (30) |
|
Accessing Form Parameters |
|
|
88 | (2) |
|
Form Processing with Functions |
|
|
90 | (3) |
|
|
93 | (10) |
|
Displaying Default Values |
|
|
103 | (2) |
|
|
105 | (7) |
|
|
112 | (1) |
|
|
112 | (2) |
|
7. Storing Information with Databases |
|
|
114 | (37) |
|
Organizing Data in a Database |
|
|
115 | (2) |
|
Connecting to a Database Program |
|
|
117 | (2) |
|
|
119 | (2) |
|
Putting Data into the Database |
|
|
121 | (5) |
|
Inserting Form Data Safely |
|
|
126 | (1) |
|
|
127 | (1) |
|
A Complete Data Insertion Form |
|
|
128 | (3) |
|
Retrieving Data from the Database |
|
|
131 | (5) |
|
Changing the Format of Retrieved Rows |
|
|
136 | (2) |
|
Retrieving Form Data Safely |
|
|
138 | (3) |
|
A Complete Data Retrieval Form |
|
|
141 | (4) |
|
|
145 | (3) |
|
|
148 | (1) |
|
|
149 | (2) |
|
8. Remembering Users with Cookies and Sessions |
|
|
151 | (19) |
|
|
152 | (4) |
|
|
156 | (1) |
|
Storing and Retrieving Information |
|
|
157 | (3) |
|
|
160 | (1) |
|
Login and User Identification |
|
|
161 | (6) |
|
Why setcookie() and session_start() Want to Be at the Top of the Page |
|
|
167 | (1) |
|
|
168 | (1) |
|
|
169 | (1) |
|
9. Handling Dates and Times |
|
|
170 | (22) |
|
Displaying the Date or Time |
|
|
170 | (5) |
|
|
175 | (1) |
|
|
176 | (10) |
|
|
186 | (4) |
|
|
190 | (1) |
|
|
190 | (2) |
10. Working with Files |
|
192 | (18) |
|
Understanding File Permissions |
|
|
192 | (1) |
|
Reading and Writing Entire Files |
|
|
193 | (4) |
|
Reading and Writing Parts of Files |
|
|
197 | (3) |
|
|
200 | (3) |
|
Inspecting File Permissions |
|
|
203 | (1) |
|
|
204 | (2) |
|
Sanitizing Externally Supplied Filenames |
|
|
206 | (2) |
|
|
208 | (1) |
|
|
208 | (2) |
11. Parsing and Generating XML |
|
210 | (11) |
|
|
211 | (6) |
|
Generating an XML Document |
|
|
217 | (2) |
|
|
219 | (1) |
|
|
219 | (2) |
12. Debugging |
|
221 | (11) |
|
Controlling Where Errors Appear |
|
|
221 | (1) |
|
|
222 | (4) |
|
|
226 | (3) |
|
|
229 | (1) |
|
|
230 | (1) |
|
|
230 | (2) |
13. What Else Can You Do with PHP? |
|
232 | (23) |
|
|
232 | (1) |
|
|
233 | (1) |
|
|
234 | (2) |
|
|
236 | (1) |
|
Sending and Receiving Mail |
|
|
236 | (1) |
|
|
237 | (2) |
|
The HTML_QuickForm Form-Handling Framework |
|
|
239 | (3) |
|
|
242 | (2) |
|
|
244 | (3) |
|
|
247 | (1) |
|
|
248 | (1) |
|
|
249 | (1) |
|
|
250 | (1) |
|
Talking to Other Languages |
|
|
251 | (1) |
|
|
251 | (2) |
|
|
253 | (1) |
|
|
253 | (1) |
|
Even More Things You Can Do with PHP |
|
|
254 | (1) |
A. Installing and Configuring the PHP Interpreter |
|
255 | (25) |
B. Regular Expression Basics |
|
280 | (16) |
C. Answers To Exercises |
|
296 | (39) |
Index |
|
335 | |