You could just write one script that says, "Select all my data; I don't care about the order," but that would be boring. In this chapter, you'll see four ways to select records from the my_music table. To facilitate easy navigation, create an administration menu—fancy words for "a list of links to scripts."
Open a new file in your text editor and type the following HTML:
<HTML> <HEAD> <TITLE>My Menu</TITLE> </HEAD> <BODY> <H1>My Menu</H1> <P><strong>My Music</strong></P>
Start a bulleted list, and create the first link to a script called sel_byid.php. This script will display the records ordered by ID number:
<ul> <li><a href="sel_byid.php">ordered by ID</a>
Add a link to a script called sel_bydateacq.php. This script will display the records ordered by date acquired. The most recently acquired item is listed first:
<li><a href="sel_bydateacq.php">ordered by date acquired</a> (most recent first)
Add a link to a script called sel_bytitle.php. This script will display the records ordered by title:
<li><a href="sel_bytitle.php">ordered by title</a>
Add a link to a script called sel_byartist.php. This script will display the records ordered by artist:
Close the bulleted list, and then add some HTML so that the document is valid:
</ul> </HTML>
Save the file with the name my_menu.html, and place this file in the document root of your web server.
Open your web browser and type http://127.0.0.1/my_menu.html.
In the next sections, you create the scripts that do all the aforementioned selecting.