862 show_book.php script show_book.php script (Shopping Cart application), 520, 526-527, 549 show_cart.php script (Shopping Cart application), 527-529 adding items to cart, 533-535 header bar summary, printing, 536 updated carts, saving, 535-536 viewing contents of cart, 530, 533 show_cat.php script (Shopping Cart appli- cation), 520, 524-525 show_source() function, 435 shuffle() function, 84-85 SHUTDOWN privilege, 188 signature.tif, 713 Simple Mail Transfer Protocol (SMTP), 358, 586 Simple Object Access Protocol. See SOAP simplegraph.php file, 390 sin() function, 736 sites, FTP sites, 388. See also Web sites size, images (manipulating), 560 slash (\), regular expressions, 113 Slashdot Web site, 294, 675 slashes, backslash (\), 257 Smart Form Mail application, 95-97, 114 SMTP (Simple Mail Transfer Protocol), 358, 586 Snoopy class (PHP), 376 SOAP (Simple Object Access Protocol) Amazon, 739-740, 747, 777-778 envelopes, 745 example, 744 instances, 778 libraries, 745 software engineering, 440-441 software errors, 271, 279-280 solution components, user personalization, 474-475 sort parameters, 771 sort() function, 80-81 sorting associative arrays, 80-81 multidimensional arrays, 82-84 Source Forge Web site, 814 source installations, 791 SourceForge Web site, 376, 449 spam, reverse spam, 278 special characters, 113-114 special privileges, 188 specifications, CGI Web site, 355 split() function, 116, 580 splitting strings, 103-105, 116 sprintf() function, 99 SQL (Structured Query Language) ANSI standard, Web site, 220 Book-O-Rama database, 203-205 commands, CREATE TABLE command, 191-192 data, inserting into databases, 204-206 databases, 203 data, aggregating, 215-217 data, grouping, 215-217 data, inserting, 204-206 data, retrieving, 206-215 dropping, 220 joins, 214 records, 217-220 rows, 212-213, 217 tables, 211-213, 218-220 two-table joins, 209-211 DML (Data Manipulation Languages), 204 MySQL, 214-215 RDBMS (relational database management systems), 203 resources, 815 SQL Course Web site, 815 SSL (Secure Socket Layer), 276, 318, 789, 799-800 compression, 321 encryption, 332-333 handshaking, 320-321 protocol stacks, 319-320 sending data, 321-322 Standard Generalized Markup Language (SGML), 740 41 525x index 1/24/03 3:39 PM Page 862 863 stristr() function standards, code, 442 startElementHandler() method, 773 starting sessions, 416 startup parameters, 802 stat() function, 350 statements ALTER TABLE, 218-219 break statement, 49 continue statement, 49 DELETE, 219 describe user, [edit, OK], 242 DESCRIBE, 251 DROP DATABASE, 220 DROP TABLE, 220 echo statements, 22-23 else statements, 41-42 elseif statements, 42 exit statement, 49 EXPLAIN, 251-254 GRANT, 241, 249 if statements, 40 include() statement, 126-128 INSERT, 204 LOAD DATA INFILE, 257 PHP statements, 17 require() statement, 119-128 return statement, 139 SELECT, 206, 214 SELECT, LIMIT clause, 217 SHOW COLUMNS, 249 SHOW GRANTS, 249-250 SHOW TABLES, 249 SHOW, 249-251 switch statements, 43-44 UPDATE, 217 status, variable status (testing), 39 STD(column) function, 215 STDDEV(column) function, 215 stock quotes, retrieving for Web pages, 359-360 storage, files (content management sys- tems), 557 store account() function, 637 store list() function, 656 store_account_settings() function, 602-603 store_new_post() function, 701-703 stories.php, 562 stories.php file, 568, 572, 575 storing bookmarks, 475 passwords, 247, 297-300 redundant data (Web databases), 173-175 session IDs in cookies, 415-416 strings, formatting strings for storage, 101-102 storing data, files. See files storing sensitive data, secure storage, 323- 325 story submit.php, 563 story.php, 562 str replace() function, 721 strategies, commercial Web sites, 272 strcasecmp() function, 105 strcmp() function, 105 string case functions, 101 string column types, 200-201 string concatenation operator, 22-23 string operators, 29 strings comparing, 105-106 evaluating, 430-431 formatting, 97-102 joining, 103 length, testing, 106 ordering, 105-106 printing, 98-100 splitting, 103-105, 116 storing, formatting strings for storage, 101-102 substrings, 104-109, 115 tokens, 104 StripSlashes() function, 102, 228, 248, 323 strip_tags() function, 323 stristr() function, 107 How can we make this index more useful? Email us at indexes@samspublishing.com 41 525x index 1/24/03 3:39 PM Page 863 864 strlen() function strlen() function, 106 strnatcmp() function, 106 Stronghold, 288 strpos() function, 107-108 strrchr() function, 107 strrpos() function, 108 strstr() function, 107, 501 strtok() function, 104 strtolower() function, 101 strtoupper() function, 101 Structured Query Language. See SQL structures, components, 446 str_replace() function, 108 subclasses (object-oriented development), 147, 153-154 subexpressions, 112 submit button, users, votes, casting, 405 subscribe() function, 651 subscribers, databases, 622 subscribing (MLM), 650, 652 substr() function, 104-105 substrings accessing, substr() function, 104-105 finding, 106-108, 115 replacing, 108-109, 115 substr_replace() function, 109 subtraction operator, 28 SUM(column) function, 215 Summary Web site, 264 superclasses (object-oriented develop- ment), 147, 153-154 superglobal variables, 27 supporting images in PHP, 387-388 switch statements, 43-44 switches, mysql command, 183 syntactic sugar, 442 syntax. See code syntax errors, 456-457 syntax highlighter, 435 system() function, 352 systems. See also privilege system capacity limits (commercial Web sites), 272 operating (database security), 247 requirements, user personalization, 474 SYSTRAN Web site, 813 T t parameters, 771 t1lib, downloading, 388 tab control sequence (\t), 59 tables aliases, 213 altering, 218-219 BDB, 256 Book-O-Rama database, SQL code, 205 Cartesian product, 210 columns, 170 atomic column values, 175-176 DESCRIBE statement, 251 types, 193-195 columns_priv, 242-245 creating in MySQL, 191-195 data, retrieving, 209-214 databases, 170, 177, 255 db, 242-244 dropping, 220 equi-joins, 210 grant, 242, 245-246 HEAP, 256 host, 242-244 joins, 209-214 keys, 171, 176 MyISAM, 256 rows returning, 217 unmatched, 212-213 values, 171 schemas, 172 scope fields, 243 tables_priv, 242-245 41 525x index 1/24/03 3:39 PM Page 864 865 time and date two-table joins, 209-211 types, 256 user, 242-243 tables_priv table, 242-245 tags <IMG SRC>, 561 closing and opening (XML), 743 HTML tags, meta tags, 157 PHP tags, 16-17, 120 TCP (Transmission Control Protocol), 320 TCP/IP networks, security, 275 templates, Web site templates (require() statement), 120-125 terminating execution (scripts), 431 ternary operator, 34 testing code, 452-453 GPG (Gnu Privacy Guard), 328-333 PHP, 799, 809 SSL, 799-800 string length, 106 variable status, 39 text anti-aliasing, 393 buttons, colors and fonts, 396 ciphertext (encryption), 284 fitting onto buttons, 399, 401-402 images creating, 396, 399-404 drawing or printing on, 391-393 plain text (encryption), 284 positioning onto buttons, 402-403 writing onto buttons, 403 text files, 51-52 checking existence of, 65 checking size of, 65 closing, 60 deleting, 65 disadvantages, 68 formats, 59-60 locking, 66-68 navigating inside files, 65-66 opening, 53-58 reading, 53, 60-64 writing to, 53, 59-60 TEXT type, 200-201 Thawte, 280, 287 threaded discussion group application, 675, 704 article list, 681 collapsing threads, 682, 686 displaying articles, 686-687 expanding threads, 682-685 individual articles, viewing, 694-696 new articles, adding, 696-703 plus symbols, 682 treenode class, 687-694 database design, 678-680 extensions, 703 files, 678 posters, 678 solutions, 676-678 tree of articles, 691 tree structure, 676-677 tree_node class, 677 threaded discussion groups, threads, 675 threads (Web forum application) collapsing, 682, 686 expanding, 682-687 threats to security, 274 Denial of Service (DoS), 278 errors in software, 279-280 exposure of confidential data, 275-276 loss or destruction of data, 276-277 modification of data, 277-278 repudiation, 280-281 three-dimensional arrays, 79-80 TIFF library Web site, 712 time and date converting between PHP and MySQL for- mats, 383-384 in MySQL, 383-386 in PHP calendar functions, 385-386 checkdate() function, 382 How can we make this index more useful? Email us at indexes@samspublishing.com 41 525x index 1/24/03 3:39 PM Page 865 866 time and date date calculations, 384-385 date() function, 379-382 floor() function, 385 getdate() function, 382 mktime() function, 381-382, 385 PHP Web site, 386 timeouts, avoiding (FTP), 373 TIMESTAMP display types, 199 TLS (Transport Layer Security), 322 tokens (strings), 104 topbar.php file, 757 totaling forms, with operators, 35-36 touch() function, 351 traceroute command (Unix), 276 tracking success of Web sites, 263-264 tracking user’s purchases (Shopping Cart application), 512 Transmission Control Protocol (TCP), 320 transactions, secure transactions Internet, 317-318 screening user input, 322-323 Secure Sockets Layer (SSL), 319-322 secure storage, 323-324 user information, 315 user machines, 316-317 your system, 318-319 Transport Layer Security (TLS), 322 tree of articles (Web forum application), 691 tree structure (Web forum application), 676-677 treenode class (Web forum application), 687, 690-694 tree_node class, 677 triggering errors, 468 trim() function, 98, 227 Tripwire, 278 troubleshooting opening files, 56-58 TrueType fonts, 396 tuples (tables), 171 two-dimensional arrays, 77-79 two-table joins, 209-211 type codes, conversion specification type codes, 100 type parameters, 771 type variable, 770 types tables, 256 variables, 25-26 U u switch (add – to front) (mysql com- mand), 183 uasort() function, 83 ucfirst() function, 101 ucwords() function, 101 uksort() function, 83 umask() function, 347 undefined functions, calling, 130 uninterruptible power supply (UPS), 292 UNISYS Web site, 389 Unix installing, 796-797 time stamps, date() function, 381-382 traceroute command, 276 UNIX_TIMESTAMP function, 384 unlink() function, 65, 351 unmatched rows, 212-213 unpublish story.php, 563 unserialize() function, 432, 781 unset() function, 39 UNSIGNED keyword, 193 unsubscribe() function, 651 unsubscribing (MLM), 650-652 update anomalies (Web databases), avoid- ing, 174-175 UPDATE privilege, 187 statement, 217 updating privileges, 246 records, 217-218 vote database, code, 405 upload.html file, 338 41 525x index 1/24/03 3:39 PM Page 866 . arrays, 7 9-8 0 TIFF library Web site, 712 time and date converting between PHP and MySQL for- mats, 38 3-3 84 in MySQL, 38 3-3 86 in PHP calendar functions, 38 5-3 86 checkdate() function, 382 How can we. 580 splitting strings, 10 3-1 05, 116 sprintf() function, 99 SQL (Structured Query Language) ANSI standard, Web site, 220 Book-O-Rama database, 20 3-2 05 commands, CREATE TABLE command, 19 1-1 92 data, inserting. values, 17 5-1 76 DESCRIBE statement, 251 types, 19 3-1 95 columns_priv, 24 2-2 45 creating in MySQL, 19 1-1 95 data, retrieving, 20 9-2 14 databases, 170, 177, 255 db, 24 2-2 44 dropping, 220 equi-joins, 210 grant,