Prev | Current Page 88 | Next

Larry Ullman

"Building a Web Site with Ajax: Visual QuickProject Guide"

This data will be handled by the JavaScript
in the Web browser. Start a new PHP script in your text editor or IDE.
1 This PHP page will not
be viewed in the Web
browser, so it begins with
the opening PHP tag, not
any HTML. (See extra
bits on page 125.)
3 XML data begins wth
the declaration.
4 All XML documents have one
root element. This can be a made-up
value, like employees here.
header(???Content-Type: text/xml???);
echo ???standalone=???yes??? ?>

???;
2 The header() function is used
to send meta-information (i.e., not
actual data). Here the header()
function sends a Content-Type of
text/xml. In layman??™s terms, this
is a way of saying that XML data
should be expected to follow.
enabling an Ajax search 107
query the database
1 We make sure that some
value was submitted for the
last name or else there??™s no
need to query the database.
2 The MySQL connection
script is included.
3 The query will return every
employee??™s name, email,
address, and department
whose last name begins with
the submitted letters.


Pages:
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100