In Chapter 7,“Designing Your Web Database,” we outlined how Web database architectures
work. Just to remind you, here are the steps again:
1. A user’s Web browser issues an HTTP request for a particular Web page. For example,
the user might have requested a search for all the books written by Michael
Morgan at Book-O-Rama, using an HTML form.The search results page is called
results.php.
2. TheWeb server receives the request for results.php, retrieves the file, and passes it
to the PHP engine for processing.
3. The PHP engine begins parsing the script. Inside the script is a command to connect
to the database and execute a query (perform the search for books). PHP
opens a connection to the MySQL server and sends on the appropriate query.
4. The MySQL server receives the database query, processes it, and sends the results—
a list of books—back to the PHP engine.
5. The PHP engine finishes running the script that will usually involve formatting
the query results nicely in HTML. It then returns the resulting HTML to the Web
server.
6. The Web server passes the HTML back to the br
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment