Display article
In this section of the tutorial you will build the page that actually
displays the content of an article. As this page will be included in the
main index of the site, you can skip adding links that will change the
article, or point towards another page.
The purpose of this page is to retrieve an article from the database,
and display its contents on page. The article ID to be retrieved is
passed to the page through an URL parameter, which is fed into a filtered
recordset.
This way, only the selected article will be displayed.
To create this page, follow the next steps:
- Open the front/view_art.php
page in Dreamweaver.
- Create a new recordset into the page, by clicking
on the button of the . From the pop-up menu, select .
- The dialog box
opens. Configure it, by selecting the database connection you are using
for the site, and in the table drop-down menu, select pages_pag.
Now the recordset retrieves all records from the database, regardless
of the parameter that is passed to
it.
- To filter the recordset, select in the
Filter drop-down menu the
table field, and for the condition set it to be equal to an URL parameter
called .
- At this point the page displays only the recordset
that is required through the parameter, and you can finish configuring
the recordset. Just click on the button
to add it into the page. Also, don't forget to enter a name for your recordset:
rsArticles:
- Now the rsArticles recordset
appears in the Bindings tab. Since all this page will do is display the
content of the retrieved article, you can simply drag & drop the body_pag field from the
tab, onto the page:
- At this point, the page to display the content of
an article is finished, and you can save it and upload it to the server.
There is no point in previewing it yet, unless you know the exact URL
parameter for an existing article.
When loaded in the browser with a correct id_pag
value, it will display similar to the image below:

The next step is to integrate
the three pages you've created until now (the menu, article lists and
article page) into a single file, with the help of .