<<

. 131
( 132 .)



>>

URL (Uniform Resource Locator)
Unix
control characters, 186
CD, back-of-the-book, 557
described, 184“185
epoch, time since, 730
file pointer, opening to indicated (FOPEN()),
installation, MySQL/PHP
171“172
described, 575“578
non-alphanumeric characters, 185
PHP/Apache, 578“580
string, encoding (urlencode()), 185
seconds since Epoch (MICROTIME()),
undoing encoding (urldecode()), 185
169“170
U.S. dollar value, formatting (money()), 670
string, encrypting, 731“732
user
timestamp, 729“730
error message, sending (trigger_error()
unmapped root-level styles, retrieving
and user_error()), 187
(LIST_UNMAPPED_STYLES()), 425
postings, finding all (fetch_user()),
unmask value, setting (UMASK()), 173
378“379
unordered (ul_list()), 672
project management database
unsetting variable functions, 148
adding information, 545
update
design, 542
anomalies, 5, 8
mapping, 543
SQL statements, running, 677“678
types, 541“542
update queries
verifying information
adding slashes (ADDSLASHES()), 138
(CREATE_ENTRY()), 250“253
removing slashes (STRIPSLASHES()),
validating (connect_validate_login()),
138“139
374“375
testing, 124
762 Index

user administration value
database table, 600“601 of all defined constants
grant statement, 602“604 (get_defined_constants()), 149
reloading grants, 605 array
revoke statement, 602, 604 returning all (ARRAY_VALUES()), 161
rights, granting, 597“598 returning defined in enum field
tables_priv, 601“602 (enum_to_array()), 679“680
user table, 599“600 catalog classes, saving them
viewing grants, 604 (WRITE_TO_DB()), 420
user authentication configuration option, assigning
content-management system (ini_set()), 189
(content/authenticate.php), of defined constant (constant()), 149
387“389 defined superset, storing (set), 32“33
getting from browser or verifying against finding (isset()), 112
database table (authenticate()), 669 in first argument is found in second
Guestbook 2003 library argument (IN_ARRAY()), 159
(GUESTBOOK_AUTHENTICATE()), key, seeking in array
244“248 (ARRAY_KEY_EXISTS()), 159“160
user-defined function and keys, exchanging (ARRAY_FLIP()),
arguments, variable number of, 205“206 155“156
authentication and text manipulation, limited potential (enum), 32
669“670 lowest, removing (min() function), 78
basics, 200“203 matching field, getting all (FETCH_ALL()),
calling (call_user_func()), 176 417
database, working with, 670“671 NULL, checking for (nullop()), 373“374
email validation, 682“688 PHP functions, 135“136
form elements, 673“675 property, setting in catalog classes
HTML elements, creating, 671“673 (BUILD()), 414
passing array (call_user_func_array()), removing highest (max() function), 78
176 retrieving
queries, dealing with common, 676“680 with predicate (in/not in), 71“72
returning values, 203“205 within a range (between), 70“71
session handling, 680“682 user-defined functions, 203“205
variable scope, 206“208 with wildcard characters (like clause), 72
Web server documents, examining, 688“690 selecting database (db_fetch_record()),
username 670
current, 731 of specified type, returning (intval(),
guestbook, verifying, 257“258 doubleval(), and stringval()), 115
utilities of string argument, writing to file
administrative tasks, performing (FWRITE()), 172
(mysqladmin), 586“587 unmask, setting (UMASK()), 173
command-line interface (mysql), 583“586 variable, defining (define()), 149
status-information commands, 587“590 vandals, blocking form input, 231“234
variable
V array elements, converting (COMPACT()), 153
formatting (SESSION_ENCODE()), 485
validating
global, 580
email, 682“688
PHP scripts
email addresses, 266
arrays, assigning, 96“99
user and password
creating (SESSION_DECODE()), 485
(connect_validate_login()), 374“375
Index 763

declaring, 91“93 query, printing (PRINT_ENTRY()),
strings, delimiting, 94“96 248“249
two-dimensional arrays, assigning, 99 user authentication
printing, 166 (GUESTBOOK_AUTHENTICATE()),
setting to specified type (SETTYPE()), 153 244“248
static, using in methods (DBH()), 413“414 verifying user information
type (CREATE_ENTRY()), 250“253
changing, 114“115 project status, 548“552
returning as string (GETTYPE()), 153 user grants, 604
returning (GETTYPE()), 153
W
setting, 634“635
testing (is_array(), is_numeric(), WDDX functions, 639
and is_string()), 148 Web server documents, examining, 688“690
variable functions Web-development site, 694
defining with specified name and value Webmonkey Web site, 695
(define()), 149 week
name and value of all defined constants beginning with Monday index (WEEKDAY),
(get_defined_constants()), 149 720
rounding down floating-point (floor()), beginning with Sunday index (DAYOFWEEK),
149 719“720
true/false (isset()), 148 full name of day (DAYNAME), 721
unsetting, 148 of year (YEARWEEK), 722
user-defined, 206“208 where clause, updating, 55“56
value of defined constant (constant()), 149 while loop
variable variables, PHP scripts, 115“116 with list() = each() structure, 128
verifying multiple, 129
user information (CREATE_ENTRY()), syntax, 127
250“253 white spaces, trimming (TRIM()), 139
username and password (authenticate()), width, image (GETIMAGESIZE()), 181
669 wildcard characters
version strings, matching, 697
MySQL server, 731 values, retrieving with, 72
PHP, 188 Windows (Microsoft)
version of story, getting in CD, back-of-the-book, 557
content-management system installation, MySQL/PHP
(fetch_story_version()), 376“378 binaries, assorted, 572“575
viewing NuSphere, 572
files, project management, 545 phpdev bundle, 571“572
Guestbook 2003 entries, 255“257 winner
Guestbook 2003 library (FROM claim code, checking (claim.php), 304“308
/GUESTBOOK2K/FUNCTIONS.PHP) random, drawing in survey
arguments, printing (admin/get_winner.php), 303
(PRINT_INPUT_FIELDS()), 249“250 survey, notifying (admin/winners.php),
database call, putting together 303“304
(SELECT_ENTRIES()), 253“254 workflow stages, table
disconnecting (MYSQL_DBCONNECT()), building for content management system
242“243 (stage_table_name()), 380“381
navigational elements, creating (NAV()), building for workflow stages
254“255 (stage_table_name()), 380“381
764 Index

writing
Y
custom handlers
year
(SESSION_SET_SAVE_HANDLER()),
calculating day from specified (FROM_DAYS),
shopping cart session, 485
726
queries to Guestbook 2003
day of, 720
(SAFE_MYSQL_QUERY()), 243“244
month, day format, 36
quarter, 721
X week of (YEARWEEK), 722
X, absolute value of, 702
XML (eXtensible Markup Language) parsing
Z
application scope and goals, 506“508
zend.com Web site, 692“693
displaying, 512“518
zero-length string, 24
parsers, described, 508“509
reasons to use, 505
Simplexml, 509“511
Slashdot headline, 511“512
XPAT functions, 637“639
Wiley Publishing, Inc.
End-User License Agreement
READ THIS. You should carefully read these terms and conditions before opening the software
packet(s) included with this book “Book”. This is a license agreement “Agreement” between
you and Wiley Publishing, Inc. “WPI”. By opening the accompanying software packet(s), you
acknowledge that you have read and accept the following terms and conditions. If you do not
agree and do not want to be bound by such terms and conditions, promptly return the Book
and the unopened software packet(s) to the place you obtained them for a full refund.
1. License Grant. WPI grants to you (either an individual or entity) a nonexclusive
license to use one copy of the enclosed software program(s) (collectively, the
“Software,” solely for your own personal or business purposes on a single computer
(whether a standard computer or a workstation component of a multi-user net-
work). The Software is in use on a computer when it is loaded into temporary
memory (RAM) or installed into permanent memory (hard disk, CD-ROM, or other
storage device). WPI reserves all rights not expressly granted herein.
2. Ownership. WPI is the owner of all right, title, and interest, including copyright, in
and to the compilation of the Software recorded on the disk(s) or CD-ROM
“Software Media”. Copyright to the individual programs recorded on the Software
Media is owned by the author or other authorized copyright owner of each pro-
gram. Ownership of the Software and all proprietary rights relating thereto remain
with WPI and its licensers.
3. Restrictions On Use and Transfer.
(a) You may only (i) make one copy of the Software for backup or archival pur-
poses, or (ii) transfer the Software to a single hard disk, provided that you keep
the original for backup or archival purposes. You may not (i) rent or lease the
Software, (ii) copy or reproduce the Software through a LAN or other network
system or through any computer subscriber system or bulletin-board system, or
(iii) modify, adapt, or create derivative works based on the Software.
(b) You may not reverse engineer, decompile, or disassemble the Software. You
may transfer the Software and user documentation on a permanent basis,
provided that the transferee agrees to accept the terms and conditions of
this Agreement and you retain no copies. If the Software is an update or has
been updated, any transfer must include the most recent update and all prior
versions.
4. Restrictions on Use of Individual Programs. You must follow the individual
requirements and restrictions detailed for each individual program in the About
the CD-ROM appendix of this Book. These limitations are also contained in the
individual license agreements recorded on the Software Media. These limitations
may include a requirement that after using the program for a specified period of
time, the user must pay a registration fee or discontinue use. By opening the
Software packet(s), you will be agreeing to abide by the licenses and restrictions
for these individual programs that are detailed in the About the CD-ROM appendix
and on the Software Media. None of the material on this Software Media or listed
in this Book may ever be redistributed, in original or modified form, for commer-
cial purposes.
5. Limited Warranty.
(a) WPI warrants that the Software and Software Media are free from defects in
materials and workmanship under normal use for a period of sixty (60) days
from the date of purchase of this Book. If WPI receives notification within the
warranty period of defects in materials or workmanship, WPI will replace the
defective Software Media.
(b) WPI AND THE AUTHOR(S) OF THE BOOK DISCLAIM ALL OTHER WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION IMPLIED WAR-
RANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
WITH RESPECT TO THE SOFTWARE, THE PROGRAMS, THE SOURCE CODE
CONTAINED THEREIN, AND/OR THE TECHNIQUES DESCRIBED IN THIS BOOK.
WPI DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE SOFT-
WARE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE
SOFTWARE WILL BE ERROR FREE.
(c) This limited warranty gives you specific legal rights, and you may have other
rights that vary from jurisdiction to jurisdiction.
6. Remedies.
(a) WPI™s entire liability and your exclusive remedy for defects in materials and
workmanship shall be limited to replacement of the Software Media, which
may be returned to WPI with a copy of your receipt at the following address:
Software Media Fulfillment Department, Attn.: MySQL/PHP Database
Applications, Second Edition, Wiley Publishing, Inc., 10475 Crosspoint Blvd.,
Indianapolis, IN 46256, or call 1-800-762-2974. Please allow four to six weeks
for delivery. This Limited Warranty is void if failure of the Software Media has
resulted from accident, abuse, or misapplication. Any replacement Software
Media will be warranted for the remainder of the original warranty period or
thirty (30) days, whichever is longer.
(b) In no event shall WPI or the author be liable for any damages whatsoever
(including without limitation damages for loss of business profits, business
interruption, loss of business information, or any other pecuniary loss) arising
from the use of or inability to use the Book or the Software, even if WPI has
been advised of the possibility of such damages.
(c) Because some jurisdictions do not allow the exclusion or limitation of liability
for consequential or incidental damages, the above limitation or exclusion may
not apply to you.
7. U.S. Government Restricted Rights. Use, duplication, or disclosure of the Software
for or on behalf of the United States of America, its agencies and/or instrumentali-
ties “U.S. Government” is subject to restrictions as stated in paragraph (c)(1)(ii) of
the Rights in Technical Data and Computer Software clause of DFARS 252.227-7013,
or subparagraphs (c) (1) and (2) of the Commercial Computer Software - Restricted
Rights clause at FAR 52.227-19, and in similar clauses in the NASA FAR supple-
ment, as applicable.

<<

. 131
( 132 .)



>>