The Results Page
Setting up the site-->
Setting up the search page-->
Setting up the results page-->
Results page continued-->
Details page and dynamic images-->
Wrapping it up-->
Open the results.php page. Right now there is only a simple table on the page, but soon we will add lots of PHP scripting that will connect placeholder text to the database. Let’s set up the connection first.
Go to Window>Databases. Make sure that entire palette group is open: Databases, Bindings, and Server Behaviors. With the Databases tab selected, click the plus sign and choose “MySQL Connection.”
Fill in the dialog box as follows: connPets for the Connection Name, localhost for the MySQL Server, your MySQL User Name (root unless you have added users), your MySQL password, and animal_rescue for the Database (unless you gave your database a different name.) You can also browse for the database, and see a list of all of your databases in the MySQL server. Click the test button, and if everything went well, you should see a message that the connection was successfully made.

Now switch to the bindings panel. Again, choose the plus button, this time choosing “Recordset Query.” A dialog box appears with a number of fields to populate. Just as you named the connection with a conn prefix, name the recordset with a rs prefix: rsResults. This will help you understand your code if you ever need to troubleshoot, but you really can name your connections almost anything you like within proper naming conventions. Choose your connection (connPets) and table. Filter by breed, as that is how our search is conducted. Make sure you see the equals sign and URL Parameter in the next two objects, then enter the name you gave the list/menu object on your index page: petBreed.

Now turn your attention to the table on the results.php page. Under the header cells, fill in some placeholder text for each of the three cells. You can duplicate the header names: breed, name, and age. Format this text as paragraph, if you like, so that it takes on the style sheet attributes.
Select the text in the first cell, which you have probably named “breed.” Go to your bindings panel, expand the recordset, if necessary, and choose the database item called breed. Choose the insert button, and you now have an instant binding of the breed field to the placeholder text in the table! Repeat this process for the second and third cells, inserting the name and age database fields into their respective areas.
