822 buttons
submit (users), 405 text
colors and fonts, 396 fitting onto, 399-402 positioning onto, 402-403 writing onto, 403 View Mail, 665
C C2Net Web site, 288 cache() function, 779-781 cached() function, 779-781 caching Amazon, 747, 778-781 calculate_items() function, 533-535 calculate_price() function, 533-534 calculating dates in PHP, 384-385 Calendar Conversions Overview Web site, 386
calendar functions, 385-386 callback functions, 773-776 callbacks, 773
calling
class operations, 151-152 functions, 19
calling functions, 128-131 calling scripts for buttons, code, 396 canvas images, creating, 391 canvases, base (setting up), 399 caret symbol (^), regular expressions, 112-113
Cartesian product (join type), 214 Cartesian product of tables, 210 CAs (Certifying Authorities), 287-288 cascading style sheets (CSS), 450 case, formatting strings, 101 case sensitivity, calling functions, 130-131 casting votes, 404-405
casts (variable types), 26 catalog scripts (Shopping Cart applica-tion)
index.php, 519-524
catching files, HTML (code), 340 categories (browse nodes), 748 category page (Shopping Cart applica-tion), 520, 524-525
categoryList array, 759 cDataHandler() method, 773 Certificate Signing Request (CSR), 289 certification project, personalized docu-ments
files, 713 headers, 737 index.html, 713-715 PDF, 722, 725-729 PDFlib, 729, 733-736 RTF, 718-721 score.php, 715-717
Certifying Authorities (CAs), 287-288 CGI Interpreter, PHP (running), 790 CGI specification Web site, 355 Change Password button, 652 change password() function, 494, 653 CHANGE [COLUMN] column new_col-umn description syntax, 219
change_passwd.php, 476 change_passwd_form.php, 476 character classes (regular expressions), 111
character sets (regular expressions), 110-111
characters, reading, 64 charts, bar, 412 check admin user() function, 634 check logged in() function, 634 check normal user() function, 634 check valid user() function, 489 checkdate() function, 382 checkdnsrr() function, 365 checkout button, 785 Checkout links, 751 checkout.php script (Shopping Cart appli-cation), 536
check_auth_user() function, 598
Trang 2823 code
child nodes (Web forum tree structure), 677
chmod() function, 351 choosing development environments, 448 chop() function, 98
chown() function, 350-351 ciphertext (encryption), 284 classes
AmazonResultSet, 760-770 AmazonResultSet.php, 761-769 attributes, 148-151
constructors, 148-149 creating, 147-149 designing, 155-156 inheritance, 147, 152-155 instantiation, 149 operations, 148, 151-152 PHP classes, Snoopy, 376 Product.php, 776 subclasses, 147, 153-154 superclasses, 147, 153-154 treenode class (Web forum application),
687, 690-694 tree_node class, 677 writing code, 165 attributes, 156-157 functions, 157-158 meta tags, 157 operations, 158 Page class code listing, 158, 162 ServicesPage class, 163-164 TLA Consulting home page, generat-ing, 162-163
classes (object-oriented development), 146 clauses
GROUP BY, 216 HAVING, 217 LIMIT, SELECT statement, 217 ORDER BY, SELECT statement, 214 SELECT, 216
WHERE, 207-210
ClibPDF library Web site, 712
Client URL (cURL) functions, 374-376 Client URL (cURL) Web site, 376 closeddir() function, 346
closedir($dir) function, 346 closing tags (XML), 743 code
ADD [COLUMN] (column_description, column_description, ), 218
ADD [COLUMN] column_description [FIRST | AFTER column], 218 ADD INDEX [index] (column, ), 218 ADD PRIMARY KEY (column, ), 218 ADD UNIQUE [index] (column, ), 218 ALTER [COLUMN] column {SET DEFAULT value | DROP DEFAULT}, 218
ALTER TABLE statement, 218-219 Amazon shopping cart functions, 781-784 AmazonResultSet.php class, 761-769 Book-O-Rama database, tables, 205 breaking up, 445-446
browseNodeSearch() method, 769-770 buttons, script to call, 396
cache() function, 779-781 cached() function, 779-781 callback functions, 773-776 CHANGE [COLUMN] column new_col-umn description, 219
commenting, 444-445 constants.php file (Amazon), 755 content, separating from content, 450 DESCRIBE statement, 251
directories, uploaded file listing, 345-346 directory structures, component struc-tures, 446
DROP [COLUMN] column, 219 DROP INDEX index, 219 DROP PRIMARY KEY, 219 extended, 216
file status function results, 348, 353 function libraries, developing, 446 getARS() function, 760
How can we make this index more useful? Email us at indexes@samspublishing.com
Trang 3824 code
graphs, 407-410 HTML, 338-340 indenting, 41, 445 index.php core application file (Amazon), 752-755
line graphs, script for outputting, 390 logic, 450
MODIFY [COLUMN] column_descrip-tion, 219
naming conventions, 443-444 optimizations, 451-452 parseXML() method, 772 poll database, setting up, 404-405 Product.php class, 776
prototypes, 449-450 RENAME [AS] new_table_name, 219
reusing See reusing code
rewriting, 441-442 SHOW statement, 250-251 showBrowseNode() functions, 760 showCategories() function, 758-759 SOAP example, 744
standards, 442 testing, 452-453 users, casting votes, 404-405 version control, 446-447 vote database, 405 writing for classes, 156-158, 162-165 writing, maintainability, 442-446 XML example, 740-742
code blocks, 40-41, 140-141 code listings
authentication basic authentication with Apache’s htaccess files, 305-307
htaccess file for authenticating users against a MySQL database, 312 PHP and HTTP basic authentication, 303
queries that create auth database, auth table, and sample users, 299 simple authentication mechanism, 296
authentication application authmain.php script, 423 logout.php script, 427 members_only.php script, 426 Book-O-Rama application, 232-234 Book-O-Rama Database Search page, 224 classes
Page class, 158, 162 ServicesPage class, 163 directory submission forms, 362 generating Bob’s Freight Table with PHP, 47
HTML for Bob’s Auto Parts order form, 13
HTML for Bob’s Freight Table, 45 HTML form to send encrypted email, 329 HTML that produces TLA Consulting’s home page, 121
loading arrays from files, 87 MySQL database, retrieving search results, 225, 237
pages to dump contents of variables for debugging, 463-465, 468-469 PHP that produces TLA Consulting’s home page, 123
recursion, 142 reordering arrays, 84 script declares custom error handler, 469 script that retrieves stock quote from NASDAQ, 359
script that works out a person’s age based
on birth date, 384 script to download new versions of a file from an FTP server, 366
script to make HTTPS connections, 375 script to verify URL and email address, 363
scripts list of extensions and functions in PHP, 433
PHP script to call GPG and send encrypted email, 329
Trang 4825 comments
sessions, 418-420 Shopping Cart application admin.php script, 546 book_sc database, creating, 517 calculate_items() function, 534 calculate_price() function, 534 checkout.php script, 537 db_result_to_array() function, 523 display_book_form() function, 550 display_cart() function, 531 display_categories() function, 523 get_categories() function, 522 get_category_name() function, 525 index.php script, 521
insert_book.php script, 548 insert_order() function, 539 process.php script, 542 purchase.php script, 537 show_book.php script, 526 show_cart.php script, 529 show_cat.php script, 524 SQL to create tables for Book-O-Rama application, 191
Warm Mail application database, creating, 589 delete_account() function, 604 delete_message() function, 615 display_account_setup() function, 601 display_list() function, 608
get_accounts() function, 602 index script, 590
number_of_accounts() function, 605 open_mailbox() function, 609 retrieve_message() function, 612 send_message() function, 617 store_account_settings() function, 602 Web forum application
add_quoting() function, 700 article view, 683
discussion database, 680 display_tree() function, 686 expand_all() function, 685
get_post() function, 695 get_post_title() function, 699 individual articles, displaying, 694 new articles, adding, 697
posts, adding to database, 701 store_new_post() function, 701 treenode class, 687
code modules, Shopping Cart application, 514
Codewalkers Web site, 814 collapsing threads (Web forum applica-tion), 682, 686
colors
buttons, 396, 399 RGB (red, green, and blue), 392
column types (tables), 193-195
date and time types, TIMESTAMP dis-play types, 199
numeric types, 197-198 string types, 200-201
columns
DESCRIBE statement, 251 tables, 170-171, 175-176 values, EXPLAIN statement, 253
columns_priv table, 242-245 combination assignment operators, 30 comma operator, 34
commands
DESCRIBE command, 195 GRANT command, 185-186, 189, 241 mysql command, 183
NET START MySQL, 802 phpinfo() command, 27 REVOKE command, 188-189 running on Web servers, functions, 352-354
SHOW command, 195 SQL commands, CREATE TABLE com-mand, 191-192
traceroute (Unix), 276
commenting code, 444-445 comments, 18
How can we make this index more useful? Email us at indexes@samspublishing.com
Trang 5826 commercial Web sites
commercial Web sites, 261
adding value to goods or services, 268 authentication, 275
cutting costs, 269 firewalls, 290 importance of stored information, 274 online brochures, 262-264
orders for goods or services, 265-268 privacy policies, 266
providing services and digital goods, 268 risks, 269-272
Secure Electronic Transaction standard, 280
security, 274-282 authentication, 282-283 backing up data, 290-291 Certificate Signing Request (CSR), 289
Certifying Authorities (CAs), 287 compromises, 281
Denial of Service (DoS), 278 digital certificates, 287-288 digital signatures, 286-287 encryption, 284-286 errors in software, 279-280 exposure of confidential data, 275-276 hash function, 286
log files, 289-290 loss or destruction of data, 276-277 modification of data, 277-278 passwords, 282-283
physical security, 291-292 repudiation, 280-281 Secure Web servers, 288-289 security policies, creating, 281-282 threats, 274-281
strategies, selecting, 272 user interface design, 267
comparing strings, 105-106 comparison operators, 33
equals operator, 32 WHERE clauses, 208
component structures, 446 components
online newsletters, 622 user personalization, 474-475
compression
GIFs, 389 SSL (Secure Sockets Layer), 321
computer hardware failure (commercial Web sites), 271
Concurrent Versions System (CVS), 447 conditionals, 40-45
configuring
Apache, PHP, 795, 808 IIS (Internet Information Server), 308-309 mod_SSL, 796
PHP, 795 sessions, 421
connection verification, MySQL database, 245
connections
Amazon, 739-740 FTP connections, closing, 372 HTTPS connections, 375 MySQL, errors, 459-461 network services, 461-462 persistent, database optimization, 256 remote FTP servers, mirroring files, 369 Web databases, 228-229, 232
constants, 26-27 constants.php file (Amazon), 755 constructors (object-oriented develop-ment), 148-149
content (code), separating from logic, 450 content management systems, 555
building, 556 content, editing, 556 databases, 557, 563-565 document structure, 558 files, 562-563
FTP access, 556 images, manipulating, 560-562 implementing, 565