In response, the web server returns an HTTP header, and then the requested resource if the request is satisfied. Continuing the example, the server looking after http://www .invyhome.com returns the following response: HTTP/1.1 200 OK Date: Wed, 02 Aug 2006 14:55:15 GMT Server: Apache (Mandriva Linux/PREFORK-1mdv2007.0) Last-Modified: Tue, 27 Jul 2006 18:27:45 GMT ETag: "3fc424-1e5-be72aa40" Accept-Ranges: bytes Content-Length: 1485 Content-Type: text/html X-Pad: avoid browser bug "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
Artists
Artists
artist_id
artist_name
?>
Enter your name
404 | Chapter 13: Web Database Applications
Artists
artist_id
artist_name
// Connect to the MySQL server if (!($connection = @ mysql_connect("localhost", "root", "the_mysql_root_password"))) die("Cannot connect"); if (!(mysql_select_db("music", $connection))) die("Couldn't select music database Run the query on the connection if (result = @ mysql_query("SELECT * FROM artist, $connection))) die("Couldn't run query Until there are no rows in the result set, fetch a row into the row array and while (row = @ mysql_fetch_array($result, MYSQL_ASSOC)) { // Start a table row print "